From ec3dfdee6a09e1ad8d4e319876d0cf7691397245 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 4 Jul 2001 05:18:29 +0000 Subject: [PATCH] Only write out one blank line before the request data. This closes SF patch #419459. --- Lib/urllib.py | 4 ++-- Lib/urllib2.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/urllib.py b/Lib/urllib.py index 53005c8d8d..084d32af30 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 992c83b5a1..ee0bc271c1 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -809,7 +809,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() -- 2.49.0