Message254249
| Author |
martin.panter |
| Recipients |
Sean.Wang, martin.panter, paul.moore, steve.dower, terry.reedy, tim.golden, xiang.zhang, zach.ware |
| Date |
2015年11月07日.01:41:25 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1446860486.89.0.311259933204.issue25534@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|