Re: HTTP pipelining question
Date: Mon, 24 Dec 2007 22:56:59 +0100 (CET)
On Mon, 24 Dec 2007, Dmitry Kurochkin wrote:
> * About to connect() to ya.ru port 80 (#2)
> * Trying 18.104.22.168... * Connection #0 isn't open enough, can't reuse
> After looking at source code this looks like intended behavior. Here is a
> comment from ConnectionExists function:
> /* Don't pick a connection that hasn't connected yet or that is going to
> get closed. */
> I do not understand this. Why does not libcurl detect that there is another
> connection being made to the server and reuses it?
That's just because nobody made it better yet. Pipelining is very little used
and I personally haven't had enough time and energy to keep up the development
of it. There are a few bugs and features left until libcurl's pipelining
support can be considered stellar.
We'll of course appreciate your help and efforts to push this forward.
> I guess it would work if I wait for the first connection to complete before
> the second easy handle is added. But what I really want is libcurl to do
> this scheduling for me.
Yeah, I agree that it would be a nicer way to deal with this situation. I
think it turned out this way simple because originally the code would let the
subsequent connections get pipelined right away before the connection was
complete, and that lead to disasters because the code assumpt it could
continue immediately. So, making this "step back" was a work-around to at
least get things to work for already estblished connections.
> This looks like a common problem to me. So there should be some solution I
Common for poeple that would create a lot of simultanoues handles to the same
host and using pipelining, but I actually think you're the first
(libcurl-using) one with this use-case!
libcurl is all volunteer work done on spare time. We do make an effort to make
it as good and solid as possible, but in some areas our spare time and energy
haven't yet been enough.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-12-24