From: Fred Drake Date: Wed, 4 Jul 2001 05:18:18 +0000 (+0000) Subject: Only write out one blank line before the request data. X-Git-Tag: v2.1.1c1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f6de5a65de1039421915be0f7e102ca4cfe8ae5;p=thirdparty%2FPython%2Fcpython.git Only write out one blank line before the request data. This closes SF patch #419459. --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 53005c8d8d5a..084d32af30b0 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -286,7 +286,7 @@ class URLopener: for args in self.addheaders: apply(h.putheader, args) h.endheaders() if data is not None: - h.send(data + '\r\n') + h.send(data) errcode, errmsg, headers = h.getreply() fp = h.getfile() if errcode == 200: @@ -364,7 +364,7 @@ class URLopener: for args in self.addheaders: apply(h.putheader, args) h.endheaders() if data is not None: - h.send(data + '\r\n') + h.send(data) errcode, errmsg, headers = h.getreply() fp = h.getfile() if errcode == 200: diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 042f2ba6f2c3..5685c82d0bee 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -808,7 +808,7 @@ class AbstractHTTPHandler(BaseHandler): h.putheader(k, v) h.endheaders() if req.has_data(): - h.send(data + '\r\n') + h.send(data) code, msg, hdrs = h.getreply() fp = h.getfile()