Mercurial > hg
view hg @ 4226:fffacca46f09
Work around a urllib2 bug in Python < 2.4.2
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.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Mar 2007 00:22:53 -0300 |
parents | ad4a2eefe4d7 |
children | abaee83ce0a6 |
line wrap: on
line source
#!/usr/bin/env python # # mercurial - scalable distributed SCM # # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. from mercurial import commands commands.run()