Bugfix for leaking Proxy-Authorization header to remote host when using

tunneling
This commit is contained in:
ivannotes 2014-08-01 09:22:58 +08:00 committed by Daniel Graña
parent ed1f376d2b
commit d8793afccf
1 changed files with 2 additions and 0 deletions

View File

@ -166,6 +166,8 @@ class ScrapyAgent(object):
url = urldefrag(request.url)[0]
method = request.method
headers = TxHeaders(request.headers)
if isinstance(agent, self._TunnelingAgent):
headers.removeHeader('Proxy-Authorization')
bodyproducer = _RequestBodyProducer(request.body) if request.body else None
start_time = time()