On Mon, 20 Sep 2021 16:09:14 GMT, Daniel Fuchs <dfu...@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 12 commits: >> >> - 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 >> - correct path handling >> - small spec rewording >> - add module main class to symbolgenerator >> - remove UnmodifiableHeaders constant >> - ... and 2 more: >> https://git.openjdk.java.net/jdk/compare/4d95a5d6...10523290 > > src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/FileServerHandler.java > line 340: > >> 338: } >> 339: } >> 340: return false; > > This will start checking from the root of the file system. I believe we want > to start checking from the root of the FileServerHandler, root excluded. Maybe these checks should be made in `mapToPath` instead since you already walk the path there - and IIRC returning null from `mapToPath` will cause HTTP 404. ------------- PR: https://git.openjdk.java.net/jdk/pull/5505