[ moin-Bugs-664589 ] forced binary stdout/stderr confuses some servers

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <[email protected]>
Bugs item #664589, was opened at 2003-01-08 20:36
Message generated for change (Comment added) made by thomaswaldmann
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108482&aid=664589&group_id=8482

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Chuck Adams (skeptopotamus)
Assigned to: Nobody/Anonymous (nobody)
Summary: forced binary stdout/stderr confuses some servers

Initial Comment:
I&#039;m serving moin with tinyweb, and was being driven 
insane by seeing no output produced by the script, even 
when I wrapped everyting in try/catch and even forced a 
text/plain header as the very first line of the cgi driver.  I 
looked into cgimain.py and saw these suspicious 
looking lines:

   if sys.platform == "win32" and not properties.get
(&#039;standalone&#039;, 0):
        import msvcrt
        msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
        msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)

Commenting them out fixed the problem.  This sort of os-
level fiddling really needs to be a configuration item, and 
broken out into a module like "platformhacks.py"

----------------------------------------------------------------------

>Comment By: Thomas Waldmann (thomaswaldmann)
Date: 2004-03-27 15:43

Message:
Logged In: YES 
user_id=100649

As long as there is no developer working and testing with
win32, this is unlikely to get changed.

Most (if not all) current developers use linux or BSD or Mac
OS X as development platform, so if we would change anything
relating to win32 only, we couldn't even test it.

So we better don't change anything there and leave it to
people who can also test those changes.

If you can work out a patch definitely working for tinyweb,
IIS and apache, please do.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108482&aid=664589&group_id=8482


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.