RFR: 8245095: Implementation of JEP 408: Simple Web Server [v5]

Hannes Wallnöfer hannesw at openjdk.java.net
Tue Sep 21 15:09:59 UTC 2021


On Tue, 21 Sep 2021 14:59:18 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

>> Julia Boes has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>> 
>>  - Merge branch 'master' into simpleserver
>>  - Merge remote-tracking branch 'origin/simpleserver' into simpleserver
>>  - Merge branch 'master' into simpleserver
>>  - refactor isHidden,isReadable,isSymlink checks and cleanup tests
>>  - Merge branch 'master' into simpleserver
>>  - check isHidden, isSymlink, isReadable for all path segments 
>>  - add checks for all path segments
>>  - Merge branch 'master' into componentcheck
>>  - Merge branch 'master' into simpleserver
>>  - improve output on startup
>>  - ... and 6 more: https://git.openjdk.java.net/jdk/compare/6d91a3eb...fe059131
>
> 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.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5505



More information about the build-dev mailing list