Code Review 6954525: Testcase failure java/net/Authenticator/B4769350.java
Chris Hegarty
chris.hegarty at oracle.com
Wed Jun 23 07:08:32 PDT 2010
Hi Michael, Max,
This is a code review request for CR 6954525: Testcase failure
java/net/Authenticator/B4769350.java.
Essentially, there is a race among requesting threads in the test. The
threads are making HTTP requests requiring authentication. This is fine,
and what the test is trying to achieve, but some of the final replies
from the server/proxy closed the connection after they send the response
without notifying the HTTP client. If these connections go back into the
keep alive cache they may cause problems when/if reused by another
thread. See bug eval section for more details.
The solution is to include the 'Connection: close' header if the
server/proxy is going to close the connection.
Also, sun.net.www.protocol.http.HttpURLConnection.disconnectWeb should
check if the connection is to be kept alive before automatically resetting.
Webrev:
http://cr.openjdk.java.net/~chegar/6954525/webrev.00/webrev/
Thanks,
-Chris.
More information about the net-dev
mailing list