summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-04-24 14:17:06 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-04-24 14:17:06 (GMT)
commit43c5af026fbb004b115358e943aca21432d7a76a (patch)
treec0d8b36908c6cc1659ba94f7372d83b540296e50 /Lib/urllib.py
parentc1488413e4a5f0fb4df102c036e7c3124def9816 (diff)
downloadcpython-43c5af026fbb004b115358e943aca21432d7a76a.zip
cpython-43c5af026fbb004b115358e943aca21432d7a76a.tar.gz
cpython-43c5af026fbb004b115358e943aca21432d7a76a.tar.bz2
Fix to previous patch: send the request data when it's provided
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index a1dcbda..7328f9a 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -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: