Show More
@@ -120,16 +120,6 b' class proxyhandler(urllib2.ProxyHandler)' | |||||
120 | if e.startswith('.') and host.endswith(e[1:]): |
|
120 | if e.startswith('.') and host.endswith(e[1:]): | |
121 | return None |
|
121 | return None | |
122 |
|
122 | |||
123 | # work around a bug in Python < 2.4.2 |
|
|||
124 | # (it leaves a "\n" at the end of Proxy-authorization headers) |
|
|||
125 | baseclass = req.__class__ |
|
|||
126 | class _request(baseclass): |
|
|||
127 | def add_header(self, key, val): |
|
|||
128 | if key.lower() == 'proxy-authorization': |
|
|||
129 | val = val.strip() |
|
|||
130 | return baseclass.add_header(self, key, val) |
|
|||
131 | req.__class__ = _request |
|
|||
132 |
|
||||
133 | return urllib2.ProxyHandler.proxy_open(self, req, proxy, type_) |
|
123 | return urllib2.ProxyHandler.proxy_open(self, req, proxy, type_) | |
134 |
|
124 | |||
135 | def _gen_sendfile(orgsend): |
|
125 | def _gen_sendfile(orgsend): |
General Comments 0
You need to be logged in to leave comments.
Login now