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."""