diff options
author | Fred Drake <fdrake@acm.org> | 2001-07-04 05:18:18 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-07-04 05:18:18 (GMT) |
commit | 3f6de5a65de1039421915be0f7e102ca4cfe8ae5 (patch) | |
tree | 1338bf974b2ab3c617caa832d437552f10e4b644 | |
parent | f0f49d9828d7b63830015c7b66a0464a965203c1 (diff) | |
download | cpython-3f6de5a65de1039421915be0f7e102ca4cfe8ae5.zip cpython-3f6de5a65de1039421915be0f7e102ca4cfe8ae5.tar.gz cpython-3f6de5a65de1039421915be0f7e102ca4cfe8ae5.tar.bz2 |
Only write out one blank line before the request data.
This closes SF patch #419459.
-rw-r--r-- | Lib/urllib.py | 4 | ||||
-rw-r--r-- | Lib/urllib2.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 53005c8..084d32a 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 042f2ba..5685c82 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() |