From: Andrew M. Kuchling Date: Mon, 24 Apr 2000 14:17:06 +0000 (+0000) Subject: Fix to previous patch: send the request data when it's provided X-Git-Tag: v2.0b1~1960 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43c5af026fbb004b115358e943aca21432d7a76a;p=python Fix to previous patch: send the request data when it's provided --- diff --git a/Lib/urllib.py b/Lib/urllib.py index a1dcbdaedb..7328f9a691 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: