RFR: 8245095: Implementation of JEP 408: Simple Web Server [v5]
Daniel Fuchs
dfuchs at openjdk.java.net
Tue Sep 21 15:59:37 UTC 2021
On Tue, 21 Sep 2021 15:06:09 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> test/jdk/com/sun/net/httpserver/simpleserver/SecurityManagerTest.java line 198:
>>
>>> 196:
>>> 197: static final DateTimeFormatter HTTP_DATE_FORMATTER =
>>> 198: DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss v");
>>
>> I think this and other usages of `DateTimeFormatter.ofPattern` need to be called with `Locale.US` (or something similar) as second argument, otherwise the current default locale will be used. I noticed because on my laptop the `Last-modified` header contains a german date.
>
> I just realized I commented on a test file, while the actual culprit is in `FileServerHandler.java`. But I guess it applies to all usages of this class and method.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5505
More information about the build-dev
mailing list