W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: Keep-alive problem

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Tue, 18 May 1999 17:04:53 -0400
To: www-lib@w3.org
Message-ID: <3741D5F5.E811FD6F@w3.org>
To: Michael Sierchio <Msierchio@RSA.com>
Michael Sierchio wrote:

> Following w3c as an example, I have been trying to produce a
> programmatic interface to: POSTing url-encoded form and getting
> the response code,  possibly with HTML response.  The problem I am
> having is that if the server sends a response header with a
> "Connection: keep-alive" header,  and I set the HTRequest_setOuputFormat()
> to "www/void" (WWW_RAW),  the returned page becomes available
> immediately but the event loop waits (blocks) -- either until the
> server timeout value is reached, or the client timeout is reached
> (in which case an error occurs, even if the POST was accepted and
> a response received).

'WWW_RAW' means that the MIME header stream is not used at all but the
data is pumped directly from the network to the application. Instead of
using the WWW_RAW format, why don't you use the WWW_SOURCE format which
parses the MIME headers but passes the entity body through to the
application asis. That way, the end of message marker is found even if
the TCP connection is not closed.
 
> I'd be most grateful for illumination on this topic -- I'd like to
> get this nailed down before I attempt to get my arms around using
> SSL as a transport.

As you may know, we have a libwww-ssl glue code but I still have to get
it up on the export controlled server at MIT. Hopefully this will happen
fairly soon.

-- 
Henrik Frystyk Nielsen, <frystyk@w3.org>
World Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA
Received on Tuesday, 18 May 1999 17:04:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:29 GMT