On Thu, 22 Aug 2024 11:04:52 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

> The `java/net/httpclient/HttpsTunnelAuthTest.java` has been observed failing 
> intermittently with `java.io.IOException: HTTP/1.1 header parser received no 
> bytes`, ... `Caused by: java.net.SocketException: Connection reset `.
> 
> My suspicion is that the ProxyServer used by this test is the cause of the 
> reset: when a tunnel connection is established, the proxy server acts as an 
> intermediary between the client and the server, and shuffles things around in 
> two directions between two sockets. However, if one end of one of the two 
> sockets gets closed, the proxy will abruptly close the two sockets, without 
> waiting for inflight traffic on the other direction to quiesce. I believe 
> this is what is causing the connection reset.

LGTM. Please update the copyright before integrating.

test/jdk/java/net/httpclient/ProxyServer.java line 199:

> 197: 
> 198:         volatile boolean proxyInClosed;
> 199:         volatile boolean proxyOutClosed;

nit: these variables don't need to be volatile; they are only accessed in a 
synchronized block

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

Marked as reviewed by djelinski (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20674#pullrequestreview-2276541009
PR Review Comment: https://git.openjdk.org/jdk/pull/20674#discussion_r1741516902

Reply via email to