trivial patch for SimpleHTTPServer reporting wrong content-length for text files

Irmen de Jong irmen at -nospam-remove-this-xs4all.nl
Mon May 31 12:57:13 EDT 2004


http://sourceforge.net/tracker/?func=detail&aid=839496&group_id=5470&atid=305470


Is anybody using SimpleHTTPServer? It contains a special case for text
files, that makes it open them in another way as other files. This
causes the reported content-length to be unequal to the actual length
of the request response data (which isn't correct, obviously).

This trivial patch removes the special case from SimpleHTTPServer.

Please review and/or make a vote for this patch; the current
SimpleHTTPServer is unusable for text files...

--Irmen de Jong.



More information about the Python-list mailing list