James Rutherford added the comment: The first patch should actually be modified so the condition reads (update attached):
if body is None and method_expects_body: thelen = 0 elif body is not None: ... Demian, I believe this is equivalent to your 'expecting_len' proposal, I've just put the logic inside _set_content_length. My approach was to leave as much existing logic as possible in place to avoid the introduction of new bugs (first patch wasn't entirely successful in this!). As for OPTION, If the OPTIONS request includes a message-body (as indicated by the presence of Content-Length or Transfer-Encoding), then the media type MUST be indicated by a Content-Type field. Although this specification does not define any use for such a body, future extensions to HTTP might use the OPTIONS body to make more detailed queries on the server. >From http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-14#section-7.2 ---------- Added file: http://bugs.python.org/file38270/issue23539-py27.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23539> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com