Re: curl_exec won't return (any data)

From: Date: Tue, 08 Feb 2011 20:15:10 +0000
Subject: Re: curl_exec won't return (any data)
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.general 
Request: Send a blank email to php-general+get-311215@lists.php.net to get a copy of this message
On Tue, Feb 8, 2011 at 8:54 PM, Tolas Anon <tolas777@gmail.com> wrote: > But in the meanwhile I found a new idea to try as well; > >        curl_setopt($ch, CURLOPT_HTTPHEADER, array( >                        'Connection: Keep-Alive', >                        'Keep-Alive: 300' >        )); > > I already checked via phpinfo() that keep-alive is on in > apache2handler, and no other mentions of "keepalive" or "keep alive" > in the phpinfo() output. > > I'll post the results. > ehm.... http://www.io.com/~maus/HttpKeepAlive.html : HTTP/1.0 Under HTTP 1.0, there is no official specification for how keepalive operates. It was, in essence, tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Connection: Keep-Alive Then, when the server receives this request and generates a response, it also adds a header to the response: Connection: Keep-Alive Following this, the connection is NOT dropped, but is instead kept open. When the client sends another request, it uses the same connection. This will continue until either the client or the server decides that the conversation is over, and one of them drops the connection. ------------------------------------------------- HTTP/1.1 Under HTTP 1.1, the official keepalive method is different. All connections are kept alive, unless stated otherwise with the following header: Connection: close The Connection: Keep-Alive header no longer has any meaning because of this.. Additionally, an optional Keep-Alive: header is described, but is so underspecified as to be meaningless. Avoid it. ------------------------------------------------- And of course, my return data packet 5901 uses HTTP1.1, so the test i'm running now probably won't fix things.. :(((

« previous php.general (#311215) next »