Message127728
The POST data should be bytes. So in the attached test case, instead of
request = urllib.request.Request('http://does.not.matter', 'foo=bar')
it should be:
request = urllib.request.Request('http://does.not.matter', b'foo=bar')
And the Content-Length will be calculated using this logic.
mv = memoryview(data)
Content-length = len(mv) * mv.itemsize
Should we emphasize further that data should be bytes? I think error
message can be improved here. This issue is not a blocker. |
|
Date |
User |
Action |
Args |
2011-02-02 09:13:34 | orsenthil | set | recipients:
+ orsenthil, georg.brandl, William.Wu |
2011-02-02 09:13:34 | orsenthil | link | issue11082 messages |
2011-02-02 09:13:34 | orsenthil | create | |
|