mirror of https://github.com/python/cpython
Fix to previous patch: send the request data when it's provided
This commit is contained in:
parent
c1488413e4
commit
43c5af026f
|
@ -333,6 +333,8 @@ class URLopener:
|
||||||
if auth: h.putheader('Authorization: Basic %s' % auth)
|
if auth: h.putheader('Authorization: Basic %s' % auth)
|
||||||
for args in self.addheaders: apply(h.putheader, args)
|
for args in self.addheaders: apply(h.putheader, args)
|
||||||
h.endheaders()
|
h.endheaders()
|
||||||
|
if data is not None:
|
||||||
|
h.send(data + '\r\n')
|
||||||
errcode, errmsg, headers = h.getreply()
|
errcode, errmsg, headers = h.getreply()
|
||||||
fp = h.getfile()
|
fp = h.getfile()
|
||||||
if errcode == 200:
|
if errcode == 200:
|
||||||
|
|
Loading…
Reference in New Issue