RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v2]
robert engels
duke at openjdk.org
Fri Apr 19 15:50:00 UTC 2024
On Fri, 19 Apr 2024 15:42:15 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> robert engels has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update based on PR review
>
> test/jdk/com/sun/net/httpserver/bugs/B6968351.java line 30:
>
>> 28: * @library /test/lib
>> 29: * @run main/timeout=5 B6968351
>> 30: * @run main/othervm -Dsun.net.httpserver.nodelay=false B6968351
>
> Suggestion:
>
> * @run main/othervm/timeout=5 -Dsun.net.httpserver.nodelay=false B6968351
>
> you need the timeout on every `run` line.
>
> The test will be run as many times as there are `run` lines; I'm assuming you actually want to run it twice here, correct?
No I didn't. TBH, this is my first usage of jtreg. I was duplicating other tests somewhat blindly. I will fix.
> test/jdk/com/sun/net/httpserver/bugs/B6968351.java line 90:
>
>> 88: is.close();
>> 89: rmap.add("content-type","text/plain");
>> 90: t.sendResponseHeaders(200,5);
>
> if I read the code correctly, there might be a similar delay when sending the last chunk of a chunked response. Would you like to fix it here as well? If not, we can file another ticket for it.
>
> In order to send a chunked response, change the second parameter to `0` here.
If you send a chunked response you must close the exchange, or close the output stream, or there is no way to determine the data is done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18667#discussion_r1572573150
PR Review Comment: https://git.openjdk.org/jdk/pull/18667#discussion_r1572575348
More information about the net-dev
mailing list