RFR: 8347167: Implementation in com.sun.net.httpserver.Headers.normalize() can be improved [v2]
Volkan Yazici
vyazici at openjdk.org
Tue Nov 18 16:02:45 UTC 2025
On Mon, 17 Nov 2025 16:06:55 GMT, Josiah Noel <duke at openjdk.org> wrote:
>> Following the direction outlined in the net-dev discussion, I've updated the `com.sun.net.httpserver.Headers.normalize()` method to no longer allocate a superfluous char array when the header is already normalized.
>
> Josiah Noel has updated the pull request incrementally with one additional commit since the last revision:
>
> patch
src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java line 135:
> 133: int i = 0;
> 134: char c = key.charAt(i);
> 135: if (c >= 'A' && c <= 'Z') {
This check is wrong too – valid non-lower-case letters are ignored – and I'm the one to blame. I will take care of this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27276#discussion_r2538763852
More information about the net-dev
mailing list