mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix to previous patch: send the request data when it's provided
This commit is contained in:
parent
c1488413e4
commit
43c5af026f
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue