]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport gvanrossum's patch:
authorAnthony Baxter <anthonybaxter@gmail.com>
Thu, 18 Apr 2002 05:13:38 +0000 (05:13 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Thu, 18 Apr 2002 05:13:38 +0000 (05:13 +0000)
SF bug #543318 (Frank J. Tobin).

In DatagramRequestHandler.setup(), the wfile initialization should be
StringIO.StringIO(), not StringIO.StringIO(slf.packet).

Bugfix candidate (all the way back to Python 1.5.2 :-).

Original patches were:
python/dist/src/Lib/SocketServer.py:1.31

Lib/SocketServer.py

index e52dddc3b2de09a28867b6a77081f43ab4ce2826..44992972c9dfd9eca1c387f14542acf58920d9d6 100644 (file)
@@ -560,7 +560,7 @@ class DatagramRequestHandler(BaseRequestHandler):
         import StringIO
         self.packet, self.socket = self.request
         self.rfile = StringIO.StringIO(self.packet)
-        self.wfile = StringIO.StringIO(self.packet)
+        self.wfile = StringIO.StringIO()
 
     def finish(self):
         self.socket.sendto(self.wfile.getvalue(), self.client_address)