Re: is there keep-alive support in HTTP_Request2?

From: Date: Mon, 24 Nov 2008 22:12:00 +0000
Subject: Re: is there keep-alive support in HTTP_Request2?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-51134@lists.php.net to get a copy of this message
Hi Marc, Marc Vaillant wrote:
I'm just trying out the nice HTTP_Request2 package and wondering if it's supposed to have keep-alive support? Wrote a simple client using HTTP_Request2 to a server that sends back multiple responses via keep-alive. The client shuts down the connection after receiving the first 2 responses. Attached is the code for the client.
HTTP_Request2 supports persistent connections as defined in RFC 2616: http://tools.ietf.org/html/rfc2616#section-8.1 In other words, it won't close the connection after the request is made and response is received unless you send 'Connection: close' header or server sends 'Connection: close' header or server closes the connection. I only see a single HTTP request being done in your attached example, so the above doesn't quite apply to it. You'll have to clarify what you and your server mean by "keep-alive support".

« previous php.pear.dev (#51134) next »