Re: Getting xml-rpc and w.bloggar to work
Wari Wahab <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <1060796801.752.72.camel@async> |
On Thu, 2003-08-14 at 01:15, Abe Fettig wrote: > 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. The python faq on windows mentions this. Though it doesn't explain why I get unpredictable results even if I double the size of the content-length, but the \n -> \r\n conversion would cause multipart uploads to go awry. Anyway, what this means to me, is that If I want to implement a gzip encoding plugin, I would need to tell users to use the -u flag if on windows, or figure out a way to reopen sys.stdout as binary. I did notice on my debug outputs, that turning on the '-u' param, causes the input from w.bloggar to be filled with a lot of ^Ms at the line endings. So stdin does \r\n -> \n conversion, while stdout will do \n to \r\n. There's always new things to learn everyday :) Cheers.