hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yue Luo <yue....@sun.com>
Subject A bug?
Date Fri, 29 Aug 2003 17:33:19 GMT
   Version 2.0-rc1
   When HttpConnection.closeSocketAndStream() is called, it first closes 
the input stream, and then it closes the output stream.  When I am using 
  JSSE, the output stream seems to be also closed by the underlying 
system when the input stream is closed.  So when this method tries to 
close the output stream ( a buffered stream), flush() method will be 
called first implicitly.  Then an IOException will be thrown because the 
underlying stream is considered closed.  WrappedOutputStream.flush() 
will catch the exception and then WrappedOutputStream.handleException() 
will be called to convert the exception to a HttpRecoverableException.
   This exception is throw in perfect normal working condition, so I 
suppose it is a bug, although the end user will not notice it.  I would 
suggest closing output stream before closing input stream in 
   I am curious, is it really necessary to close the streams separately? 
  Or can we just close the socket directly?
   Another minor typo bug, the LOG message in 
HttpMethodBase.readResponseBody(HttpConnection conn) is wrong.  It is 
for the other method with the same name.  It is probably a copy & paste bug.


View raw message