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

This commit is contained in:
Andrew M. Kuchling 2000-04-24 14:17:06 +00:00
parent c1488413e4
commit 43c5af026f
1 changed files with 2 additions and 0 deletions

View File

@ -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: