This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zveinn
Recipients zveinn
Date 2021-02-26.20:38:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614371910.37.0.961874820267.issue43332@roundup.psfhosted.org>
In-reply-to
Content
def _tunnel(self):
        connect_str = "CONNECT %s:%d HTTP/1.0\r\n" % (self._tunnel_host,
            self._tunnel_port)
        connect_bytes = connect_str.encode("ascii") <<!!-- ASCII
        self.send(connect_bytes)
        for header, value in self._tunnel_headers.items():
            header_str = "%s: %s\r\n" % (header, value)
            header_bytes = header_str.encode("latin-1") <<!!-- LATIN-1
            self.send(header_bytes)
        self.send(b'\r\n')


Is it possible that the method was designed this way so that the header could be encoded with latin-1 while the connect part is encoded in ascii ? Is that needed ?
History
Date User Action Args
2021-02-26 20:38:30zveinnsetrecipients: + zveinn
2021-02-26 20:38:30zveinnsetmessageid: <1614371910.37.0.961874820267.issue43332@roundup.psfhosted.org>
2021-02-26 20:38:30zveinnlinkissue43332 messages
2021-02-26 20:38:30zveinncreate