cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_HTTPAUTH turned into a bitmask

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 18 Jun 2003 10:55:16 +0200 (CEST)

On Wed, 18 Jun 2003, John Barker wrote:

> Would it be possible to programmatically determine what authentication type
> is required when going against a particular proxy or host?

Yes, and that's why the CURLAUTH_ANY (and the bitmask concept in general) is
for. It makes libcurl pick and use the best one from those the site claims it
supports that you allow it to use.

Reading the response-headers gives this information.

I have not worked on this much for proxies, why it won't work already on
those. I hope to get some help with this from people who actually have
proxies or at least testable proxy-setups to work this out on.

I know I can setup my own proxy and config it to try on, but I feel I already
spend considerable time on curl/libcurl and I figure I could leave this for
now, knowing this is not addressed yet... So if you have such a proxy and
would like to help out, checkout curl from CVS and give it a go!

> Perhaps if a perform operation fails because of required authentication,
> one could retrieve the authentication method required with the
> curl_easy_getinfo method.

That's not a bad idea, would you be interested in making a patch that
introduces this curl_easy_getinfo() option?

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Received on 2003-06-18