hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19286] - httpClient incorrectly closing tunnelled connection right after tunnell established
Date Tue, 29 Apr 2003 18:41:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19286>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19286

httpClient incorrectly closing tunnelled connection right after tunnell established





------- Additional Comments From becke@u.washington.edu  2003-04-29 18:41 -------
Yes, quite right Oleg.  

I only have a little to add in regard to the JSSE < 1.4 isStale() problem.  As
Oleg mentioned, when using JSSE in some older JVMs, reading from an empty stream
returns -1.  The problem is that not only does this not tell us if the socket is
closed, but it also has the effect of invalidating the connection.  Just to
clarify, calling inputStream.read() on a socket in the given case breaks the
connection.  Even if you were to change the logic in isStale() to ignore a -1,
the connection would still be rendered unusable.  Given this fact and that we
have no other way to ensure that a connection is stale, persistence with JSSE
and JVMs < 1.4 is not reliable.

The only option I can see for you is to add a test in isStale() for JSSE.  If
the connection is open and is using JSSE it would always return true (without
trying to read).  This is not an optimal solution as it will not detect stale
connections but it will allow persistence.

Mike

Mime
View raw message