RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability
Michael McMahon
michaelm at openjdk.org
Tue Nov 4 14:17:44 UTC 2025
I'd like to return to this issue with a new PR that addresses the usability issue minimally. Namely to define numeric constants
for the counter-intuitive responseLength values in `HttpExchange.sendResponseHeaders`. The apidoc then refers to the constant names rather than the numeric values.
I've updated the implementation and some tests (though not all yet) to use the constant names. I'm open to suggestions on the names themselves. Once that is agreed, I'll update the remaining tests and any other call sites in the implementation.
Thanks,
Michael
-------------
Commit messages:
- implementation and test
- Merge branch 'master' into httpserver-8368955
- doc update
Changes: https://git.openjdk.org/jdk/pull/28132/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28132&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8331195
Stats: 60 lines in 9 files changed: 29 ins; 3 del; 28 mod
Patch: https://git.openjdk.org/jdk/pull/28132.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28132/head:pull/28132
PR: https://git.openjdk.org/jdk/pull/28132
More information about the net-dev
mailing list