mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 09:43:46 +00:00
Revert "[MRG+1] Cleanup http11 tunneling connection after #1678"
This commit is contained in:
parent
62a517163b
commit
35fb630c4e
@ -92,9 +92,11 @@ class TunnelingTCP4ClientEndpoint(TCP4ClientEndpoint):
|
||||
|
||||
def requestTunnel(self, protocol):
|
||||
"""Asks the proxy to open a tunnel."""
|
||||
tunnelReq = to_bytes(
|
||||
'CONNECT %s:%s HTTP/1.1\r\n' % (
|
||||
self._tunneledHost, self._tunneledPort), encoding='ascii')
|
||||
tunnelReq = (
|
||||
b'CONNECT ' +
|
||||
to_bytes(self._tunneledHost, encoding='ascii') + b':' +
|
||||
to_bytes(str(self._tunneledPort)) +
|
||||
b' HTTP/1.1\r\n')
|
||||
if self._proxyAuthHeader:
|
||||
tunnelReq += \
|
||||
b'Proxy-Authorization: ' + self._proxyAuthHeader + b'\r\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user