cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl blocking in multi-mode when doing proxied https fetch from bad host

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 23 Jan 2007 10:47:37 +0100 (CET)

On Tue, 23 Jan 2007, Adam D. Moss wrote:

>> The only work-around I can think of is to translate the function into a
>> non-blocking one.
>
> Thanks for the response. How would you rate the difficulty of such a fix to
> someone unfamiliar with the source? If it's reasonably straightforward then
> I'm happy to have a crack at a patch (any hints for how to go about it would
> thus be welcome!).

I would say that it makes sense to first make an attempt to establish that
this is truly the problem you're having.

Converting the blocking CONNECT into a non-blocking one is a matter of adding
another state in the lib/multi.c state machine for the proxy connect and make
sure that it deals with it accordingly (and that the easy interface still
works).

The best way to do that is to make sure you have a good test case to work
against/with. Preferably using curl's test suite, as then it is easier for
others to join in and assist as well.

I wouldn't say that the work is difficult, but it will take some reading and
understanding of current code and concepts before you can start poking on
actual code.

Of course you can always ask here if you get stuck anywhere.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-01-23