# HG changeset patch # User Pierre-Yves David # Date 2015-05-18 21:51:02 # Node ID 6358391453f3c72af2887968da71e1c5f3165dfc # Parent 18a032704f0ab07bc12c2ebc6bdde82080490046 url: drop awful hack around bug in Python 2.4 It's all just a memory now. diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -120,16 +120,6 @@ class proxyhandler(urllib2.ProxyHandler) if e.startswith('.') and host.endswith(e[1:]): return None - # work around a bug in Python < 2.4.2 - # (it leaves a "\n" at the end of Proxy-authorization headers) - baseclass = req.__class__ - class _request(baseclass): - def add_header(self, key, val): - if key.lower() == 'proxy-authorization': - val = val.strip() - return baseclass.add_header(self, key, val) - req.__class__ = _request - return urllib2.ProxyHandler.proxy_open(self, req, proxy, type_) def _gen_sendfile(orgsend):