cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems related to probing for proxy authentication methods

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 1 Oct 2009 22:57:22 +0200 (CEST)

On Thu, 1 Oct 2009, Joshua Kwan wrote:

> In this case, would the initial connection reset error be seen by the cURL
> client, or would it be masked unless the second request fails too?

For the "normal" requests, if the first send() on a re-used connection fails
it will silently create a new connection and retry the request on that. See
lib/url.c:Curl_do().

> I was also taking a look at Curl_proxyCONNECT and winced a little.. as it is
> blocking!
>
> We use cURL in a GUI app so it's important that it blocks as little as
> possible.

Right, and hence the comment above this function says:

   This badly needs to be rewritten. CONNECT should be sent and dealt with
   like any ordinary HTTP request, and not specially crafted like this. This
   function only remains here like this for now since the rewrite is a bit too
   much work to do at the moment.

   This function is BLOCKING which is nasty for all multi interface using apps.

Converting this blocking approach to a proper non-blocking one is indeed
something we've been wanting to do for a long time but I've so far not found
the proper motivation to go ahead.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-01