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 martin.panter
Recipients crickert, martin.panter, r.david.murray
Date 2015-11-06.23:15:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This change is a result of parameter checking added in Issue 22928. The colon is not meant to be part of a field name. This is what the request being sent by your example looks like in the unpatched 3.4. (I changed to localhost.) Your attempt to override the default Content-Type is not working due to the colon:

POST /xrbl82xr HTTP/1.1
Accept-Encoding: identity
Content-Type: application/x-www-form-urlencoded
Host: localhost
User-Agent: Python-urllib/3.4
Content-Length: 21
Content-Type:: application/x-www-form-urlencoded;charset=utf-8
Connection: close


So I don’t think this is a valid bug or regression. What gave you the idea to include the colon? Does the documentation need clarifying?

Also, I would recommend not trying to set a “charset” attribute with the form-urlencoded content type in general. It is not standardized, and I proposed to remove the recommendation from the documentation in Issue 23360 (feedback welcome). If you really need to send non-ASCII data, you might be able to get away with UTF-8 by default. Also, HTML 5 mentions a _charset_ field, and there is the multipart/form-data content type.
Date User Action Args
2015-11-06 23:15:25martin.pantersetrecipients: + martin.panter, r.david.murray, crickert
2015-11-06 23:15:25martin.pantersetmessageid: <>
2015-11-06 23:15:25martin.panterlinkissue25570 messages
2015-11-06 23:15:25martin.pantercreate