From adb180fbaf7de9f720e76b33c742f6cdaa083cdd Mon Sep 17 00:00:00 2001 From: Paul Tremberth Date: Mon, 20 Feb 2017 16:25:12 +0100 Subject: [PATCH] Use bytearray for the CONNECT message bytes buffer --- scrapy/core/downloader/handlers/http11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py index 4b02cb16f..b96c8c6fe 100644 --- a/scrapy/core/downloader/handlers/http11.py +++ b/scrapy/core/downloader/handlers/http11.py @@ -105,7 +105,7 @@ class TunnelingTCP4ClientEndpoint(TCP4ClientEndpoint): self._tunneledHost = host self._tunneledPort = port self._contextFactory = contextFactory - self._connectBuffer = b'' + self._connectBuffer = bytearray() def requestTunnel(self, protocol): """Asks the proxy to open a tunnel."""