From 556fc2c334f6cac1f4013ddc1ec1a945dd2d0863 Mon Sep 17 00:00:00 2001 From: Paul Tremberth Date: Wed, 6 Jul 2016 17:15:21 +0200 Subject: [PATCH] Cleanup unused argument --- scrapy/core/downloader/handlers/http11.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py index d02027dd1..f07397a4f 100644 --- a/scrapy/core/downloader/handlers/http11.py +++ b/scrapy/core/downloader/handlers/http11.py @@ -157,7 +157,7 @@ class TunnelingTCP4ClientEndpoint(TCP4ClientEndpoint): return self._tunnelReadyDeferred -def tunnel_request_data(host, port, proxy_auth_header=None, host_header=True): +def tunnel_request_data(host, port, proxy_auth_header=None): r""" Return binary content of a CONNECT request. @@ -171,8 +171,7 @@ def tunnel_request_data(host, port, proxy_auth_header=None, host_header=True): """ host_value = to_bytes(host, encoding='ascii') + b':' + to_bytes(str(port)) tunnel_req = b'CONNECT ' + host_value + b' HTTP/1.1\r\n' - if host_header: - tunnel_req += b'Host: ' + host_value + b'\r\n' + tunnel_req += b'Host: ' + host_value + b'\r\n' if proxy_auth_header: tunnel_req += b'Proxy-Authorization: ' + proxy_auth_header + b'\r\n' tunnel_req += b'\r\n'