hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guru Prasad P.S" <prasad...@yahoo.com>
Subject Re: instream.read() ---- In SSL mode
Date Tue, 20 Apr 2010 10:34:45 GMT
Any reason why no exception is thrown in case of non ssl mode.

Explicitly the connection is not closed before reading data from stream.

Making use of BufferedHttpEntity solves this issue. (Is it a right approach?)
entity = new BufferedHttpEntity(entity)
entity.getContent();

Use of BufferedHttpEntity() has any performance impact? 

--Prasad


________________________________
From: Oleg Kalnichevski <olegk@apache.org>
To: HttpClient User Discussion <httpclient-users@hc.apache.org>
Sent: Tue, April 20, 2010 3:23:35 PM
Subject: Re: instream.read() ---- In SSL mode

On Tue, 2010-04-20 at 02:37 -0700, Guru Prasad P.S wrote:
> Exception trace:
> java.net.SocketException: Socket Closed
>         at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:201)
>         at java.net.Socket.setSoTimeout(Socket.java:997)
>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(SSLSocketImpl.java:2061)
>         at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:145)
>         at org.apache.http.impl.conn.LoggingSessionInputBuffer.isDataAvailable(LoggingSessionInputBuffer.java:64)
>         at org.apache.http.impl.io.IdentityInputStream.available(IdentityInputStream.java:74)
>         at org.apache.http.conn.EofSensorInputStream.available(EofSensorInputStream.java:171)
>         at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
>         at java.io.FilterInputStream.read(FilterInputStream.java:90)

The exception is thrown because you are trying to read data from a
connection that has already been closed.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: mailto:httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: mailto:httpclient-users-help@hc.apache.org


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message