Message135290
Hello Bernhard,
I tried to a POST of JPEG file, through urllib2 (which internally uses httplib) and goes through the code that you pointed out and I don't face any problem. I am able to POST binaries using httplib.
I am also surprised at UnicodeDecodeError which is being raised. The POST data is string (8-bit strings) in Python2.7 and the portion of code will have no problem in creating the content.
You will get UnicodeDecodeError, only if you explicitly pass a Unicode Object as Data and never when you pass string or binary string.
Perhaps mechanize is doing something wrong here and sending a Unicode object.
So, this really does not look like a bug to me.
(Also a note on patch. The patch tries to silence the error, which is wrong thing to do).
If you can provide a simple snippet to reproduce this error, feel free reopen this again. I am closing this as 'works for me'.
Thanks. |
|
Date |
User |
Action |
Args |
2011-05-06 13:08:20 | orsenthil | set | recipients:
+ orsenthil, terry.reedy, bero, ezio.melotti, eric.araujo, santoso.wijaya |
2011-05-06 13:08:20 | orsenthil | set | messageid: <1304687300.2.0.796650121298.issue11898@psf.upfronthosting.co.za> |
2011-05-06 13:08:19 | orsenthil | link | issue11898 messages |
2011-05-06 13:08:18 | orsenthil | create | |
|