RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v3]
Jaikiran Pai
jpai at openjdk.org
Tue Sep 6 06:43:50 UTC 2022
On Mon, 5 Sep 2022 15:06:37 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Reduce the time the test runs for
>
> src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java line 511:
>
>> 509: debug.log("Ignoring (1xx informational) response code "
>> 510: + rsp.statusCode());
>> 511: }
>
> We should probably log that using one of the Log.xxx methods too ?
> Have the response headers in Response already been logged (using Log) by the time we reach here? If not we need to log them.
Hello Daniel,
> We should probably log that using one of the Log.xxx methods too ?
I've now updated the PR to add the `Log.logTrace` call too.
> Have the response headers in Response already been logged (using Log) by the time we reach here?
Yes, both for HTTP1 and HTTP2 the response headers get logged as soon as a `Response` instance is created here https://github.com/openjdk/jdk/blob/master/src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java#L209 and here https://github.com/openjdk/jdk/blob/master/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java#L516. So by the time, the control reaches here those response headers will already be logged. Do note that the spec doesn't mandate any response headers for these informational responses. So there may not be any response headers.
-------------
PR: https://git.openjdk.org/jdk/pull/10169
More information about the net-dev
mailing list