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 jeffknupp
Recipients amaury.forgeotdarc, jeffknupp
Date 2012-12-17.19:43:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1355773425.27.0.32390987194.issue16658@psf.upfronthosting.co.za>
In-reply-to
Content
I'm assuming this is the patch you were looking for. However, there are a couple of unrelated issues with http.client.send that jumped out at me:

1. Encoding a file handed directly to send() seems wrong. If a client wants to send a file encoded using something other than iso-8859-1, we've effectively short-circuited that. Since the normal request() calls take care of encoding, it seems send() should be for those that 'know what they're doing'. 

Also, nowhere in the send() documentation does it state that send() will perform this encoding (and only on a file, but not on a string?).

Removing the burden of encoding if a file-like object is passed seems more reasonable and would make the code considerably clearer. If anyone agrees, I'll open a new ticket with patch for this issue.
History
Date User Action Args
2012-12-17 19:43:45jeffknuppsetrecipients: + jeffknupp, amaury.forgeotdarc
2012-12-17 19:43:45jeffknuppsetmessageid: <1355773425.27.0.32390987194.issue16658@psf.upfronthosting.co.za>
2012-12-17 19:43:45jeffknupplinkissue16658 messages
2012-12-17 19:43:43jeffknuppcreate