cURL / Mailing Lists / curl-library / Single Mail



From: James Gallagher <>
Date: 28 Jul 2003 12:13:32 -0700


I have a possibly naive question about the HTTPAUTH feature of
libcurl-7.10.6. I have an application that needs to use authentication.
Basic authentication is OK, but I'd prefer Digest. When I call:

    curl_easy_setopt(d_curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_BASIC);

Authentication works just fine. However, when I use:


or just CURLAUTH_DIGEST alone, authentication fails. I can see with
VERBOSE and a DEBUGFUNCTION that with CURLAUTH_BASIC an Authorization
header is send to the server (here's what it looks like:
Authorization: Basic amltZzp3YXNfcXVpdA==, which seems odd since I
thought with Basic authenticationthe username and password would be sent
as plain text...) but with BASIC|DIGEST or DIGEST, there's no such

Can anybody tell me how to get Digest authentication working or what I'm
doing wrong? If so, I'd really appreciate it.

Thanks very much,

PS. I was scanning the archive for this list, looking for info about
authentication, and saw a request for a cache library. My application
needs to do caching as well. I have written a C++ class that implements
a 'mostly HTTP/1.1 compliant' cache. It's free to anyone who wants it. I
claim it's thread-safe, but testing is only minimal.

James Gallagher		         The Distributed Oceanographic Data System     
Voice: 775.337.8612					 Fax: 775.337.2105
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.;at.aspnet_072303_01/01
Received on 2003-07-28