Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2018-10-22 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (121 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!