[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does this affect 3.x also? I would expect that it does. The question for this issue is whether the program should stop on a gmtime error and say "I will not serve this file until you fix the modification time." or whether it should catch and workaround the

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-06 Thread Martin Panter
Martin Panter added the comment: I assume it affects Python 3, though I suspect the exception is OSError, not ValueError. But it would be good if someone with Windows (or other affected OS) could confirm. I think the server should serve the file, with just a best-effort attempt to serve the

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Sean Wang
New submission from Sean Wang: I transfered a file from remote Debian host to my local Windows 10 host using SecureFX. I found that the file's last modifed date was ‎1900‎/‎1‎/1‎,‏‎0:00:00 on Windows. I tried to serve this file to be downloaded, and it crashed as follows: Exception happened

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Sean Wang
Sean Wang added the comment: upload a sample test file -- Added file: http://bugs.python.org/file40929/test ___ Python tracker ___

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Martin Panter
Martin Panter added the comment: I think your test file’s time is lost on the web server. On Linux it is pretty easy to make a file with an arbitrary time; maybe Windows has an equivalent: $ touch -d "1 Jan 1900" test I experimented with Wine, and it seems gmtime() raises ValueError on Python