This is needed to keep the code in keepalive.py from sharing
the same connection between HTTP and HTTPS.
cd1a6ad30c82 explains why we were using a single handler.
This should fix issue892.
when giving user/pwd in an URL, eg.
hg pull http://user:pwd@host.com:666/hg/something,
hg would still ask for user/pwd in interactive mode (or fail in
non-interactive)
This should fix a 'hg clone "http://hg.example.org/path with spaces/"'
The code tries to do the right thing when the user passes a path that's
already escaped in part (e.g. "http://hg.example.org/path%20with spaces/").
If we're redirected, urllib2 will happily follow the URL it's given
without escaping anything. I'm not sure what we would have to hook
to work around that.
This way it is easier to debug problems with failing subcommands, like
changegroupsubset due to permission problems, when generally accessing
the repository works fine.
This can happen if an error happens while sending
application/mercurial-0.1 content. The error page will
be sent resulting (for at least lighttpd) in the following
headers:
Content-type: application/mercurial-0.1
Content-type: text/html
which result in req.proto = 'application/mercurial-0.1, text/html'
fix issue344
This should give us HTTP keepalive when we talk to proxies and
should allow us to stream a file in unbundle (instead of
reading everything into a string).
This should fix issue376.
POST+redirect doesn't work in python, as a workaround we record the url
from the previous GETs so that when we do a POST it uses the redirected url
fix issue327
When urllib2 base64-encodes the password needed for the Proxy-authorization
header, it forgets to remove the trailing "\n". Later, a "\r\n" sequence
is appended to every header, as required by the standard.
Some proxies interpret the resulting "\n\r\n" sequence in the same way as
"\r\n\r\n": end of headers. This usually doesn't cause trouble for this
request, but when the proxy tries to read the next one, it thinks the
request starts with some garbage and returns a "400 - Bad Request" error.