[Python-bugs-list] [ python-Bugs-570678 ] CGIHTTPServer flushes read-only file.
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 19 Jun 2002 02:26:46 -0700
Bugs item #570678, was opened at 2002-06-18 18:59
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=570678&group_id=5470
Category: Python Library
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Lownds (tonylownds)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: CGIHTTPServer flushes read-only file.
Initial Comment:
On Mac OS X, flushing a file open only for reading
causing an IOError. That behavior matches what the
system's fflush man page describes:
ERRORS
[EBADF] Stream is not an open stream,
or, in the case of
fflush(), not a stream open for
writing.
CGIHTTPServer.py calls .flush on the read-only part of
it's socket before it forks and then quickly breaks.
The attached patch simply removes that line.
The bug is listed as Platform-specific because this
behavior does not appear under Linux (even though the
fflush man page on Linux lists the same EBADF error).
----------------------------------------------------------------------
>Comment By: Jack Jansen (jackjansen)
Date: 2002-06-19 11:26
Message:
Logged In: YES
user_id=45365
Apparently Guido is the one who put the self.rfile.flush() call in there, so he's probably also the person who knows whether it's a good idea to take it out again.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=570678&group_id=5470