[New-bugs-announce] [issue29479] httplib: could not skip "ACCEPT-ENCODING" header

song1st report at bugs.python.org
Wed Feb 8 05:19:00 EST 2017


New submission from song1st:

When I tried to skip "ACCEPT-ENCODING" of header, I found the behavior was not right.
I think the issue is the following two "if" in _send_request of httplib.

    def _send_request(self, method, url, body, headers):
        # Honor explicitly requested Host: and Accept-Encoding: headers.
        header_names = dict.fromkeys([k.lower() for k in headers])
        skips = {}
        if 'host' in header_names:
            skips['skip_host'] = 1
        if 'accept-encoding' in header_names:
            skips['skip_accept_encoding'] = 1

----------
components: Library (Lib)
messages: 287295
nosy: song1st
priority: normal
severity: normal
status: open
title: httplib: could not skip "ACCEPT-ENCODING" header
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29479>
_______________________________________


More information about the New-bugs-announce mailing list