Are the built-in HTTP servers production quality?
Irmen de Jong
irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Sun Jul 18 12:12:18 EDT 2004
Paul Morrow wrote:
> Irmen de Jong wrote:
>
>>
>> For starters, the SimpleHTTPServer reports the wrong Content-Length.
>> See my patch at http://tinyurl.com/56frb
>>
>
> Yes, something is wrong there. I wonder though if it makes sense to
> continue to open text files in 'text' mode, so that the treatment of
> newlines is normalized, but then adjust the content-length to be the
> length of the (newline converted) string as read from the file.
>
Well, I think that could be done too.
But why not ditch the newline conversion altogether and
treat text files just as any other file (which is what my patch does).
-Irmen
More information about the Python-list
mailing list