On Tue, 18 Nov 2025 14:43:26 GMT, Daniel Fuchs <[email protected]> wrote:

>> src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java line 
>> 157:
>> 
>>> 155:                 throw new IllegalArgumentException("illegal character 
>>> in key at index " + i);
>>> 156:             }
>>> 157:             cs[0] = (char) (c - o);
>> 
>> There's an assumption here that because of the test at line 135 then `c` 
>> must be a lower case letter. But, it could in principle be any `tchar` 
>> (token character) which includes digits and vchars other than lower case 
>> letters. We should check `if (c >= 'a' && c <= 'z')`
>
> Ah! Good catch Michael!

@SentryMan can a test case be added for that - using e.g. a field name like 
"2xyz" ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27276#discussion_r2538490751

Reply via email to