cURL / Mailing Lists / curl-library / Single Mail


Re: HTTP pipelining question

From: Dmitry Kurochkin <>
Date: Tue, 25 Dec 2007 12:09:09 +0300

I have started working on it. The attached patch is my first attempt
to reuse connection before it is fully established.
The patch is really small. I removed relevant check from
ConnectionExists() and added condition for reuse case in
CreateConnection(). So the second connection goes straight to DOWAIT
Now in the scenario when you add several easy handlers with same URL
to multi and then start multi_perform loop, first connection is

I am not sure if I have broken anything. But at least all tests pass.

I would appreciate if you take a look at it.

Now I plan to implement pend_pipe list which contains pending requests
that should be pipelined but pipeline is full already. So the requests
will be put in pend_pipe list and later migrate to send_pipe, when
another request completes.

Also, at the moment all requests are sent immediately after connection
is established. Instead we should wait for the first response, check
that server accepts persistent connection and start pipelining only
after that.

BTW At line 2432 I changed check->bits.proxy to httpproxy. I am behind
a proxy at work and set http_proxy env var. detect_proxy() does not
set proxy bit but sets httpproxy. So this check fails.
I think this should be fixed in detect_proxy() to set proxy bit as
well. But I was not sure so put this little hack :)


Received on 2007-12-25