RFR: 8347000: Bug in com/sun/net/httpserver/bugs/B6361557.java test
Jaikiran Pai
jpai at openjdk.org
Tue Jan 7 12:34:46 UTC 2025
On Mon, 6 Jan 2025 05:43:31 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Can I please get a review of this change which proposes to address the test-only issue noted in https://bugs.openjdk.org/browse/JDK-8347000?
>
> As noted in that issue, the test issues HTTP requests with `Content-Length` set to `0` implying no request body. However, the code unintentionally sends additional bytes (14 bytes each request) as part of the request. The JDK's `HttpServer` implementation currently doesn't cause errors for such requests (although the HTTP/1.1 RFC expects an error to be raised).
>
> The change in this PR merely addresses the test code to not send these additional bytes. The test continues to pass after this change.
Thank you Mark and Michael for the reviews.
> We probably should have a test of the server that checks it handles pipelined requests correctly (if not optimally). Because a thread is basically assigned to a connection for the duration of a request, it means that pipelined requests will be (or should be in this impl) handled in sequence.
I will look into this and see if there's already any test where we do this. If not, I'll experiment with one as a separate task.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22921#issuecomment-2575166422
More information about the net-dev
mailing list