Re: Getting xml-rpc and w.bloggar to work

Abe Fettig <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <1060794947.519.20.camel@mingus>
On Wed, 2003-08-13 at 12:29, will wrote:

> Abe's suggestion is probably fine (I think--I have no clue how -u is
> implemented because I haven't looked at the code), except that I think
> it's covering up the symptoms of the issue.

Hi Will,

Sorry to jump into an ongoing discussion, and I hope I'm not fanning the
flames here :-).  

I haven't even looked at the code in question, but I agree that it's
always good to understand why a fix works.  So I'd like to suggest a
possible explanation.  It seems that "-u" not only turns off buffered
output, but tells Python to treat stdin and stdout as binary.  This, in
turn, has the effect of disabling "\n"->"\r\n" translation, which I
believe is the default on Windows, which could indeed cause you problems
if you're explicitly passing the Content-length header, since it would
add an additional byte per line.

For more information, try a google search on "python unbuffered windows
cgi".

Honestly, I'd never taken the time to look into why "python -u" was
preferable on Windows before this.  So thanks for the nudge.

/me goes back into lurk mode.



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
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.