cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: persistent connections in multi interface

From: amit paliwal <amit.ambitions_at_gmail.com>
Date: Thu, 11 Aug 2011 10:18:58 -0400

If I am not wrong, in normal scenario with easy handles, when we receive
HTTP 200 OK response from server with "Connection: Keep-Alive" the
connection should not get closed. Am I right here? I shall be able to use
the socket connection for later use.

On Thu, Aug 11, 2011 at 9:55 AM, Yamin Zhou <yamin_at_mavenir.com> wrote:

> Hi there,
>
> I create a multi handle, and set its MAXCONNECTIONS as 20. When a POST
> request comes, I create a easy handle for that request and add it in the
> multi handle. I explicitly add "Connection: keep-alive" HTTP header, and the
> server responds with a "Connection: keep-alive" header too. When the
> transfer is finished, I call curl_easy_cleanup to free the easy handle. But
> I see the connection is closed immediately by libcurl. Shouldn't it be
> cached?
>
> I'm using libcurl-7.20.0.
>
> thanks,
> yamin
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Regards,
Amit

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-11