The jdk.httpserver module has the com.sun.net.httpserver.Headers class which is meant to represent the HTTP request/response headers. The implementation in this class, stores the header names in an internal Map. The header names are stored as keys in the Map and the implementation in this Headers class normalizes the header names to "First character upper case, rest all characters lower case." (for example: coNtent-leNgth is normalized to Content-Length). Application code can retrieve headers names through this Headers class and while retrieving, the given header name is first normalized before looking for its value in the internal Map. The normalization is handled internally in the Headers.normalize() private method.
In a net-dev mailing list discussion, it has been proposed that this internal implementation of the normalize() method can be enhanced to improve its performance https://mail.openjdk.org/pipermail/net-dev/2025-January/025315.html.
In a net-dev mailing list discussion, it has been proposed that this internal implementation of the normalize() method can be enhanced to improve its performance https://mail.openjdk.org/pipermail/net-dev/2025-January/025315.html.