[Python-checkins] python/dist/src/Lib CGIHTTPServer.py,1.30,1.31
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sat, 28 Jun 2003 22:06:58 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv9787
Modified Files:
CGIHTTPServer.py
Log Message:
SF bug #430160: CGIHTTPServer.py POST bug using IE
Minor improvement to previous bugfix.
Eating the remaining characters would lead to an endless loop
without a termination test.
Index: CGIHTTPServer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/CGIHTTPServer.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** CGIHTTPServer.py 8 Jan 2003 18:53:18 -0000 1.30
--- CGIHTTPServer.py 29 Jun 2003 05:06:56 -0000 1.31
***************
*** 203,207 ****
# throw away additional data [see bug #427345]
while select.select([self.rfile], [], [], 0)[0]:
! waste = self.rfile.read(1)
if sts:
self.log_error("CGI script exit status %#x", sts)
--- 203,208 ----
# throw away additional data [see bug #427345]
while select.select([self.rfile], [], [], 0)[0]:
! if not self.rfile.read(1):
! break
if sts:
self.log_error("CGI script exit status %#x", sts)
***************
*** 251,255 ****
# throw away additional data [see bug #427345]
while select.select([self.rfile._sock], [], [], 0)[0]:
! waste = self.rfile._sock.recv(1)
fi.close()
shutil.copyfileobj(fo, self.wfile)
--- 252,257 ----
# throw away additional data [see bug #427345]
while select.select([self.rfile._sock], [], [], 0)[0]:
! if not self.rfile._sock.recv(1):
! break
fi.close()
shutil.copyfileobj(fo, self.wfile)