New submission from apmatthews <apmatth...@gmail.com>:

RFC 7230 3.3.2 states "A sender MUST NOT send a Content-Length header field in 
any message that contains a Transfer-Encoding header field."

When trying to perform a chunked request:

import httplib
http = httplib.HTTPSConnection('google.com')
http.request("POST", '/', None, {'Content-Type': 'text/plain',
                                 'Transfer-Encoding': 'chunked'})

Resulting headers include:

Content-Length: 0
Transfer-Encoding: chunked

The receiving server should ignore the Content-Length in this case but some 
versions of IIS don't and consequently fail to accept the chunks that follow.

----------
components: Library (Lib)
messages: 353617
nosy: apmatthews
priority: normal
severity: normal
status: open
title: httplib specifies content-length when transfer-encoding present
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38330>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to