On Thu, 5 Nov 2026 08:10:29 GMT, Volkan Yazici <[email protected]> wrote:
>> `src/jdk.httpserver/share/classes/module-info.java` documents that >> `sun.net.httpserver.maxReqHeaderSize` defaults to `393216 or 384kB`. >> This doesn't match the implementation >> `sun.net.httpserver.ServerConfig#DEFAULT_MAX_REQ_HEADER_SIZE`, which is `380 >> * 1024`, i.e., `389120 or 380kB`. >> >> Note that the `jdk.http.maxHeaderSize` system property, used by >> `HttpClient`, also defaults to `393216 or 384kB`. >> The `380` hardcoded in `DEFAULT_MAX_REQ_HEADER_SIZE` is a typo. >> Fix `DEFAULT_MAX_REQ_HEADER_SIZE` to `384 * 1024` and align it with the >> default documented in `module-info.java`. >> >> --------- >> - [X] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Volkan Yazici has updated the pull request incrementally with one additional > commit since the last revision: > > Change the default to 384kB Changing the default value to match the specification looks good to me. It makes it consistent with the default value used in the `java.net.http.HttpClient` as well as some prominent browsers. test/jdk/com/sun/net/httpserver/property/MaxReqHeaderSizePropertyTest.java line 97: > 95: .getHandlers()[0] // 2. Get its first handler > (by default it's a `ConsoleHandler`) > 96: .setLevel(Level.ALL); // 3. Sets its level to `ALL` > (by default it's `INFO`) > 97: } I haven't seen us using Loggers in our tests frequently. Is there something specific in this test that would require logger and a test specific `test.enableLogging` system property to enable it? test/jdk/com/sun/net/httpserver/property/MaxReqHeaderSizePropertyTest.java line 147: > 145: args.add(Arguments.of( > 146: "at limit", true, > 147: > createRequestHeaderLinesLeavingRoomFor50MoreCharacters(lines -> { Nit - the method name is very large. I think for descriptions like this, a smaller method name with a brief comment on the method is enough. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/33715#pullrequestreview-5782787821 PR Review Comment: https://git.openjdk.org/jdk/pull/33715#discussion_r4478822975 PR Review Comment: https://git.openjdk.org/jdk/pull/33715#discussion_r4478802240
