cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Proxy authentication with CONNECT_ONLY option.

From: Praks <praks_123_at_fastmail.fm>
Date: Fri, 07 Jul 2006 14:28:45 +0300

Hi,

On Wed, 5 Jul 2006, Praks wrote:

> I tried to incorporate the fix that was suggested, but I get a compliation
> error for "data->state.authdone", which states that the field "authdone" is
> not part of the structure "Urlstate". Anyways, I would try to workaround
> it(Hope I am not doing anything wrong here).

 
> The "fix" was a bit too quick and I just pasted that without first trying
> it
> myself and it bit me too when I tried to compile... The proper check
> probably
> looks more like
>
> if(data->set.connect_only && data->state.authhost.done &&
> data->state.authproxy.done)
>
>
> ... but again this is untested and written straight off the top of my
> head.
>

When I saw the code, I found that authhost.done and authproxy.done are set to TRUE only in the Curl_http_output_auth() routine which is called from Curl_do() function, the call to which occurs after the
          
          if(data->set.connect_only && data->state.authhost.done &&
          data->state.authproxy.done)
construct, because of which the above condition is always false and even with CONNECT_ONLY option set, the control goes to Curl_do() instead of Curl_done().

////////////////////////

   if(data->set.connect_only && data->state.authhost.done &&
         data->state.authproxy.done) {
       
        /* keep connection open for application to use the socket */
        conn->bits.close = FALSE;
        res = Curl_done(&conn, CURLE_OK);
        break;
      }
        
      
      res = Curl_do(&conn, &do_done);
/////////////////////////////////

I want to try calling the routine Curl_http_output_auth() before doing a Curl_done() in case of data->set.connect_only
and break. Again, I'm not sure what effect this will have.

Also, is there a possiblity to use Curl_proxyCONNECT() or a minor variant of this for this case ?

(PS: I had sent this mail earlier but it came as a new thread. So, i am sending this mail once again. Sorry for any inconvenience caused.)

Thanks.

-Prakash

> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
>

-- 
  Praks
  praks_123_at_fastmail.fm
-- 
http://www.fastmail.fm - Does exactly what it says on the tin
Received on 2006-07-07