RFR: 8245095: Implementation of JEP 408: Simple Web Server [v5]
dfuchs at openjdk.java.net
Tue Sep 21 16:24:37 UTC 2021
On Tue, 21 Sep 2021 16:03:28 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> Hmm... When printing messages on the console don't we want a localized date? Or are you referring to other usages of the date formatter? Worth double checking in any case.
> The problem I was referring to was not about printing to the console. I hadn't thought about that, I agree the default locale should be used there. I was referring to `Last-modified` HTTP headers with a non-English date value, e.g.:
> Last-modified: Di., 21 Sep. 2021 09:56:53 GMT
> I think browsers will get confused by this. It probably isn't a big deal since I think the server doesn't implement conditional GETs (i.e. use the last-modified date in subsequent requests), but the HTTP spec is [quite strict ] about date formats.
> : https://datatracker.ietf.org/doc/html/rfc2616#section-3.3.1
Thanks for clarifying. Yes the date should be in GMT and should not be localized when sent in a `Last-Modified` / `Date` headers. Good catch!
More information about the core-libs-dev