JDK-4774503 : keepAlive Mechanism of HttpURLConnection: Exceptions when using object serializa
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Related bug ids are: 4746367, 4752007, 4757465
A detailed description/analysis can be found in description of bug 4746367.
Wed Nov 06 03:25:56 MST 2002 as133206
Wed Nov 06 04:04:09 MST 2002 as133206
BugTraq+ Release Management Values
COMMIT TO FIX:
The proposed fix for 1.4.2 is here :-
The information in 4746367 suggests that we have a client sending
a serialized object via HTTP to a servlet but the servlet is
seeing a premature EOF and a StreamCorruptedException is thrown.
The analysis in 4746367 is based on 1.3.1_04 which has a number of
bugs in its handling of persistent connections. All of these
problems have been addressed in 1.4 and 1.4.1 and there should now
be no possibility of prematurely closing a non-idle connection.
The submiter has, however, confirmed that the exceptions have been
observed when using 1.4.1_01. We need a trace of the problem with
1.4.1_01 to diagnose the issue further - with 1.4.1 the only
possibility of premature close whilst streaming the request is if
HttpURLConnection's disconnect method is called to disconnect the
The issue is now understood and does relates to the use of the
disconnect method. disconnect is blindly closing the connection to
the server irrespective of the state of the http request. If the
response has been read to EOF the connection is returned to the
keep-alive cache and could be allocated to another http request.
Calling disconnect can thus cause havoc for this other request.