tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Multiple GETs on an SSLSocket
Date Fri, 08 Dec 2000 11:53:01 GMT

Have you tried this on a non-SSL connection?
A general problem with the IO in java (afaik) is that, if you read from the
stream, such that you get a -1 returned, then the stream is effectively
closed. You have to reconnect (I haven't tried SSL on this, but a plain
socket works like this). If you can control the sending response, ensure
either the content-length is specified or the stream is chunked so that you
can know when to stop reading -- avoiding getting a -1. YOu can then reuse
the socket, without reconnecting.

Ken on 08/12/2000 06:25:10

Please respond to

cc:    (bcc: Ken X Horn)
Subject:  Multiple GETs on an SSLSocket


This is more a java/ssl question then tomcat but any ideas on the following
will be
much appreciated...

I'm using a servlet (will be using a servlet at the moment I'm testing in a
standalone app.)
as a client to connect via https to a server. I've got as far as making the
server trusted and performing the ssl handshake and then downloading the
first html page.

The problem arises when I try to write the second GET request and flush it
the output stream. The flush() method throws an IOException. I'm using the
sample code
provided with jsse to implement things but that sample code only has one
GET request and
so works fine. The exception comes with the second GET?

Any ideas?

Mike C.

View raw message