http://qs321.pair.com?node_id=861141


in reply to Re: Using Persistent Connections with SOAP::Lite HTTP clients
in thread Using Persistent Connections with SOAP::Lite HTTP clients

I agree with everything you write, but I suspect you have misunderstood what my code does: it sets a request header in order to allow the server to leave the connection open after sending its response.

The snippet I posted sets Connection: KeepAlive on the request, letting the server know that the client can deal with KeepAlive responses.

Although HTTP 1.1 introduced this feature, clients and servers commonly support it as an extension when speaking HTTP 1.0: if the header does not exist, servers will close the TCP connection after each request as per standard HTTP 1.0.

Replies are listed 'Best First'.
Re^3: Using Persistent Connections with SOAP::Lite HTTP clients
by ddn123456 (Pilgrim) on Dec 16, 2010 at 12:52 UTC
    Hi,

    Thanks for the clarification.

    Reading it now afterwards I didn't express myself clearly enough perhaps but I did understand your code snippet perfectly.

    It does remain a nice snippet :-)

    Greetings.
    ddn123456