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

Volkan Yazici vyazici at openjdk.org
Thu May 8 11:31:55 UTC 2025


> Allows relative paths in the content root directory passed to the `jwebserver`. Changes apply to both the `jwebserver` executable and the `java -m jdk.httpserver` execution.
> 
> ### Implementation notes
> 
> Received `Path` is read using `toRealPath()`, and then employed. The rest of the logic is untouched. This effectively implies that
> 
> 1. Parts that require an absolute path (e.g., `s.n.h.s.FileServerHandler`) kept their conditions
> 2. Logging, failures, etc. containing the user-provided directory will now refer to the _real path_ instead of the user-provided one (can be relative, can be not normalized, etc.)

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

  Replace `normalize().toAbsolutePath()` with `toRealPath()`

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

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

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

  Stats: 31 lines in 3 files changed: 18 ins; 2 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