SimpleHTTPServer send wrong Content-Length for text/* on Windows?

C

Christof Hoeke

hi,
I noticed while trying a simple (but still very useful) server based on
SimpleHTTP that it does report a wrong "Content-Length" for "text/*"
files if Windows line-end "\r\n" is used.

Most clients (e.g. browsers) do simply ignore a wrong Content-Length but
there are programs that do care and simply abort handling a file given
with a wrong Content-Length and not sending enough content afterwards. I
had this problem specifically with Prince-XML but that seems to be based
on curl which therefor might also be affect other products/libs.

I found this via Google:
http://mail.python.org/pipermail/python-bugs-list/2005-January/027157.html

It seems this is not a new bug and I somehow recall that in an older
version of Python (2.4?) it did work. But in 2.5 (also 2.5.1 and 2.5.2)
this is not working anymore.

Does anyone know if this is maybe being looked into already? I could not
find anything in the Python Bug tracker but wanted to ask here first (I
actually am not sure if I can add a bug report anyway).

Thanks!
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top