Skip to content

Commit a9c7f8b

Browse files
committed
Using CRLF as line marker according to http 1.1 definition
1 parent e29eec9 commit a9c7f8b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scrapy/core/downloader/handlers/http11.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ def __init__(self, reactor, host, port, proxyConf, contextFactory,
6666

6767
def requestTunnel(self, protocol):
6868
"""Asks the proxy to open a tunnel."""
69-
tunnelReq = 'CONNECT %s:%s HTTP/1.1\n' % (self._tunneledHost,
69+
tunnelReq = 'CONNECT %s:%s HTTP/1.1\r\n' % (self._tunneledHost,
7070
self._tunneledPort)
7171
if self._proxyAuthHeader:
72-
tunnelReq += 'Proxy-Authorization: %s \n\n' % self._proxyAuthHeader
73-
else:
74-
tunnelReq += '\n'
72+
tunnelReq += 'Proxy-Authorization: %s\r\n' % self._proxyAuthHeader
73+
tunnelReq += '\r\n'
7574
protocol.transport.write(tunnelReq)
7675
self._protocolDataReceived = protocol.dataReceived
7776
protocol.dataReceived = self.processProxyResponse

0 commit comments

Comments
 (0)