1. Armin Rigo
  2. cpython-withatomic

Commits

Fred Drake  committed fdc3b16

Only write out one blank line before the request data.
This closes SF patch #419459.

  • Participants
  • Parent commits fbe0ded
  • Branches 2.1

Comments (0)

Files changed (2)

File Lib/urllib.py

View file
         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:
             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:

File Lib/urllib2.py

View file
             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()