Skip to content

Commit d8793af

Browse files
ivannotesdangra
authored andcommitted
Bugfix for leaking Proxy-Authorization header to remote host when using
tunneling
1 parent ed1f376 commit d8793af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scrapy/core/downloader/handlers/http11.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def download_request(self, request):
166166
url = urldefrag(request.url)[0]
167167
method = request.method
168168
headers = TxHeaders(request.headers)
169+
if isinstance(agent, self._TunnelingAgent):
170+
headers.removeHeader('Proxy-Authorization')
169171
bodyproducer = _RequestBodyProducer(request.body) if request.body else None
170172

171173
start_time = time()

0 commit comments

Comments
 (0)