Skip to content
Permalink
Browse files

Using CRLF as line marker according to http 1.1 definition

  • Loading branch information
ivan-aa authored and dangra committed Jul 9, 2014
1 parent 2cba7b5 commit 5ec430baa76ff8aa5c48824977c82df785dc2211
Showing with 3 additions and 4 deletions.
  1. +3 −4 scrapy/core/downloader/handlers/http11.py
@@ -66,12 +66,11 @@ def __init__(self, reactor, host, port, proxyConf, contextFactory,

def requestTunnel(self, protocol):
"""Asks the proxy to open a tunnel."""
tunnelReq = 'CONNECT %s:%s HTTP/1.1\n' % (self._tunneledHost,
tunnelReq = 'CONNECT %s:%s HTTP/1.1\r\n' % (self._tunneledHost,
self._tunneledPort)
if self._proxyAuthHeader:
tunnelReq += 'Proxy-Authorization: %s \n\n' % self._proxyAuthHeader
else:
tunnelReq += '\n'
tunnelReq += 'Proxy-Authorization: %s\r\n' % self._proxyAuthHeader
tunnelReq += '\r\n'
protocol.transport.write(tunnelReq)
self._protocolDataReceived = protocol.dataReceived
protocol.dataReceived = self.processProxyResponse

0 comments on commit 5ec430b

Please sign in to comment.