On Mon, 2010-04-19 at 20:30 -0700, Guru Prasad P.S wrote:
> While reading content ( attachment in response ) from the input stream in SSL
> mode throws java.net.SocketException: Socket Closed
>
> Note: This Exception is thrown only when response has an attachment.
>
> In non ssl mode there is no issue.
> InputStream instream = entity.getContent();
> int l;
> byte[] tmp = new byte[2048];
> while ((l = instream.read(tmp)) != -1) {
> }
>
>
> 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.io.IdentityInputStream.available(IdentityInputStream.java:74)
> at
> org.apache.http.conn.EofSensorInputStream.available(EofSensorInputStream.java:171)
>
Please post a *COMPLETE* exception trace and preferably a wire log of
the HTTP session.
http://hc.apache.org/httpcomponents-client-4.0.1/logging.html
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]