diff --git a/Lib/urllib.py b/Lib/urllib.py index 53005c8d8d5..084d32af30b 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -286,7 +286,7 @@ def open_http(self, url, data=None): 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 @@ def open_https(self, url, data=None): 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 992c83b5a1d..ee0bc271c15 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -809,7 +809,7 @@ def do_open(self, http_class, req): 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()