Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JSS SSLTest.java hanging while reading response from server

10 views
Skip to first unread message

praspa

unread,
Apr 10, 2012, 3:52:23 PM4/10/12
to dev-tec...@lists.mozilla.org

I've been working with the SSLTest.java class found here connecting to a
tomcat5 application server:
http://mxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/ssl/SSLTest.java

My issue is, my client seems to hang here on line 105 to read that the
server is done writing the response:
104 byte[] inbuf = new byte[256];
105 while( (numRead = is.read(inbuf)) != -1 ) {
106 System.out.print( new String(inbuf, 0, numRead, "UTF-8"));
107 }

The client hangs for almost exactly a minute before continuing. After the
hang, the client does receive the entire response from the server.

If I change line 105 to read only a fixed number of bytes (say the number of
bytes expected in the response from the server), the client receives the
response and proceeds instantaneously. A wireshark dump reveals that the
client is prematurely ending the session.

Is there configuration, on the SSLTest client or the tomcat server, that I
can tweak to make this transaction proceed elegantly?

Any insight would be great,
pwr



--
View this message in context: http://old.nabble.com/JSS-SSLTest.java-hanging-while-reading-response-from-server-tp33663973p33663973.html
Sent from the Mozilla - Cryptography mailing list archive at Nabble.com.

praspa

unread,
Apr 11, 2012, 9:37:50 AM4/11/12
to dev-tec...@lists.mozilla.org

Was using HTTP/1.1, forgot to specify 'Connection: close' in the client
request header. Server was waiting for more piped requests.

-pwr
View this message in context: http://old.nabble.com/JSS-SSLTest.java-hanging-while-reading-response-from-server-tp33663973p33668702.html
0 new messages