RFR: 8355360: -d option of jwebserver command should accept relative paths [v3]

Volkan Yazici vyazici at openjdk.org
Thu May 8 13:45:40 UTC 2025


> Allows relative paths in the content root directory passed to the `jwebserver`. Changes effect both the `jwebserver` executable and the `java -m jdk.httpserver` execution.
> 
> ### Implementation notes
> 
> Received `Path` is read using `toRealPath()`, and then employed in `s.n.h.s.FileServerHandler`, which is the only place in the web server code where an absolute path requirement is present.

Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:

  Revert `SimpleFileServerImpl` changes, and allow relative paths in `FileServerHandler` instead

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25113/files
  - new: https://git.openjdk.org/jdk/pull/25113/files/5f9e3df8..2f4620b6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25113&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25113&range=01-02

  Stats: 53 lines in 5 files changed: 24 ins; 18 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/25113.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25113/head:pull/25113

PR: https://git.openjdk.org/jdk/pull/25113


More information about the net-dev mailing list