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 timestamp. Some other options:

* Maybe using datetime rather than the OS’s gmtime() would be more reliable
* Omit the Last-Modified header if the timestamp cannot be represented
* Make time.gmtime() more platform-independent (probably against the original 
spirit of the module)

I don’t think setting Last-Modified to the current time is a particularly good 
idea. I guess omitting the field would have a similar effect on caching, 
without actually serving a misleading value.

----------
versions: +Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25534>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to