Scrapy, a fast high-level web crawling & scraping framework for Python.
Bugfix for leaking Proxy-Authorization header to remote host when using tunneling
ivannotesc1a108b447d4
diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.pyindex b803af1dc..23cd07c51 100644--- a/scrapy/core/downloader/handlers/http11.py+++ b/scrapy/core/downloader/handlers/http11.py@@ -166,6 +166,8 @@ class ScrapyAgent(object):url = urldefrag(request.url)[0]method = request.methodheaders = TxHeaders(request.headers)+ if isinstance(agent, self._TunnelingAgent):+ headers.removeHeader('Proxy-Authorization')bodyproducer = _RequestBodyProducer(request.body) if request.body else Nonestart_time = time()