Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Using Persistent Connections with SOAP::Lite HTTP clients

by ddn123456 (Pilgrim)
on Aug 27, 2010 at 13:46 UTC ( #857684=note: print w/replies, xml ) Need Help??


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

Great snippet! Thanks.

FYI. As of http 1.1, the persistent connection (KeepAlive header) is set to true by default.

However if the server responds with a Connection: close header, the tcp (and ssl) connection between client and server is no longer persistent. The soap session may remain in place however depending on the soap client-server application communication.

It also implies that the server is not configured or not able to maintain or support persistent connections.

With kind regards.

ddn123456

Replies are listed 'Best First'.
Re^2: Using Persistent Connections with SOAP::Lite HTTP clients
by tomhukins (Curate) on Sep 21, 2010 at 19:13 UTC
    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.

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://857684]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-07-19 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (414 votes). Check out past polls.

    Notices?