Message44870
(Python 2.3.2 on Windows)
SimpleHTTPServer reports the size of the file on disk
as Content-Length. This works except for text files.
If the content type starts with "text/" it is opening the
file in 'text' mode rather than 'binary' mode. At least on
Windows this causes newline translations, thereby making
the actual size of the content transmitted *less* than
the content-length!
I don't know why SimpleHTTPServer is reading text files
with text mode. The included patch removes this distinction
so all files are opened in binary mode (and, also on
windows,
the actual size transmitted is the same as the reported
content-length).
--Irmen de Jong
|
|
Date |
User |
Action |
Args |
2007-08-23 15:29:44 | admin | link | issue839496 messages |
2007-08-23 15:29:44 | admin | create | |
|