On Tue, 21 Jul 2026 09:58:58 GMT, Jaikiran Pai <[email protected]> wrote:

>> Fix the test so that it exercises the max request time again.
>> 
>> The test is supposed to check if the server closes the connection when it 
>> receives some bytes from the client, but the bytes do not form a complete 
>> request before the timeout elapses. Until recently, the server-side request 
>> parser was looking for a CRLF sequence before checking if the received bytes 
>> form a request, and the TLS handshake was a good enough approximation of an 
>> incomplete HTTP request. 
>> [JDK-8373677](https://bugs.openjdk.org/browse/JDK-8373677) modified the 
>> parser to reject TLS early.
>> 
>> This PR modifies the test to start sending a legal HTTP request, but stop 
>> sending before the final CRLF sequence is sent,
>> 
>> The test continues to pass.
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java
>  line 112:
> 
>> 110:     }
>> 111: 
>> 112:     static String requestText = """
> 
> Nit - perhaps add a comment like `// Intentionally incomplete HTTP request`. 
> Or maybe rename the field to `incompleteHttpRequest`.

Thanks for the review. That's actually a complete HTTP request, we just don't 
send some of its bytes. We could even use the same request in the complete 
request test, but that would require changing the logic to verify that we got 
the expected response.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31983#discussion_r3622086991

Reply via email to