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 13:09:20 +0300

Hi

 The proper check probably looks more like
       if(data->set.connect_only && data->state.authhost.done &&
          data->state.authproxy.done)

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 ?

Thanks.

-Prakash

-- 
  Praks
  praks_123_at_fastmail.fm
-- 
http://www.fastmail.fm - The way an email service should be
Received on 2006-07-07