Commit 43c5af02 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

Fix to previous patch: send the request data when it's provided

parent c1488413
......@@ -333,6 +333,8 @@ class URLopener:
if auth: h.putheader('Authorization: Basic %s' % auth)
for args in self.addheaders: apply(h.putheader, args)
h.endheaders()
if data is not None:
h.send(data + '\r\n')
errcode, errmsg, headers = h.getreply()
fp = h.getfile()
if errcode == 200:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment