On Mon, 22 Feb 2021 16:44:40 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> Right, I was mistaken. It actually is related to this change. You are 
>> testing what happens *if* the proxy closes the connection. Though that 
>> wouldn't be normal behavior for a proxy. If you are sending 407 to the 
>> client then you would want to keep the connection open so the client can 
>> retry the request. Maybe we need some comments in ProxyServer to indicate 
>> that the connection is being closed to test this specific scenario. Though 
>> if ProxyServer is used in other tests, I wonder if it might be better to use 
>> some flag or switch to enable this connection closing behavior?
>
> I have reworked the ProxyServer to keep reusing the connection if it can 
> detect that there will be no request body. If there is a request body and 407 
> is returned however, it will close the connection. That should leave things 
> unchanged for tests that might have tried to use the ProxyServer for GET/HEAD 
> requests. I suspect that no test was using it for POST as that obviously 
> could not work if authentication was required. That said, all tests are 
> passing :-)

Thanks. That looks fine now.

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

PR: https://git.openjdk.java.net/jdk/pull/2649

Reply via email to