[New-bugs-announce] [issue13132] distutils sends non-RFC compliant HTTP request

Mitchell Hashimoto report at bugs.python.org
Sat Oct 8 16:56:28 CEST 2011

New submission from Mitchell Hashimoto <xmitchx at gmail.com>:

In ``Lib/distutils/command/register.py`` as well as ``upload.py``, the following code exists to build the HTTP request body to send to the cheese shop server:

    body.write('\nContent-Disposition: form-data; name="%s"'%key)

RFC2616 page 31 (http://tools.ietf.org/html/rfc2616#page-31) states that headers must be separated by CRLF. Specifically, the above "\n\n" for the header separator is causing issues with some minimal RFC-compliant web servers.

assignee: tarek
components: Distutils
messages: 145171
nosy: eric.araujo, mitchellh, tarek
priority: normal
severity: normal
status: open
title: distutils sends non-RFC compliant HTTP request
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list