cURL / Mailing Lists / curl-library / Single Mail

curl-library

Pipelining and POST requests

From: ru-17 <ru-17_at_yandex.ru>
Date: Mon, 27 Feb 2012 17:51:24 +0400

Hi All,

I'm very curious why does pipeline is enabled only for GET and HEAD types.
I have a custom protocol over POST (avg pkt size is about 200-300 bytes for request and up to 4kb for answers).
I would like to use advantages of pipelining in my requests?

Here is my first question is there any valuable restrictions for using POST in pipeline manner?

I've modified libcurl code, and added the POST type into list of acceptable for pipelining "IsPipeliningPossible",
and seems it work somehow, now I see that only one connection is active despite the number specified by CURLMOPT_MAXCONNECTS - this is good. The bad thing is that there no pipelining, all requests performing one-by-one, i.e.
the next query is starting only after previous is complete. It's not what I expected.

Also I'm embarrassed by this part from README.pipeling
> - When a pipeline is in use, we must take precautions so that when used easy
> handles (i.e those who still wait for a response) are removed from the multi
> handle, we must deal with the outstanding response nicely.

Does this mean that I should delete easy handles before the answer would be received in "curl_multi_info_read" ?

P.S. Excuse me, if my post looks like a mess, I have too much question and no answers...

Thanks,
  Denis.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-27