United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4774503 keepAlive Mechanism of HttpURLConnection: Exceptions when using object serializa
JDK-4774503 : keepAlive Mechanism of HttpURLConnection: Exceptions when using object serializa

Details
Type:
Bug
Submit Date:
2002-11-06
Status:
Resolved
Updated Date:
2003-01-14
Project Name:
JDK
Resolved Date:
2003-01-14
Component:
core-libs
OS:
solaris_8
Sub-Component:
java.net
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.3.1_04,1.4.1_01
Fixed Versions:
1.4.2 (b13)

Related Reports

Sub Tasks

Description
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

                                    

Comments
EVALUATION


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
connection.

###@###.### 2002-11-06


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.

###@###.### 2002-11-18
                                     
2002-11-18
SUGGESTED FIX


The proposed fix for 1.4.2 is here :-
http://sunweb.ireland.sun.com/~ab23780/4774503/webrev/index.html
###@###.### 2002-11-22
                                     
2002-11-22
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis-beta

FIXED IN:
mantis-beta

INTEGRATED IN:
mantis-b13
mantis-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together