Jeff Knupp added the comment:

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.

----------
keywords: +patch
nosy: +Jeff.Knupp
Added file: http://bugs.python.org/file28345/http_client.patch

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

Reply via email to