cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: authentication and cookie

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 17 Mar 2004 11:07:34 +0100 (CET)

On Wed, 17 Mar 2004, Yoav Schreiber wrote:

> I'm trying to connect a web server that requires basic authentication. I'm
> connecting it with the user and the password (curl_easy_setopt() with
> CURLOPT_USERPWD).
>
> The response I am getting from the server is error 401 with a set cookie in
> the response header (although the user and password were set correctly).

If the user name and password are correct, then why is the server not letting
you in?

> The Server expects me to resend the request with the cookie set (from
> looking at IE / Mozilla communication, this behavior does work and the
> Server response is valid - 200).

So it wants the autentication header _and_ the cookie?

> Is there any way I can overcome this with libcurl?

Provide the cookie in the request? There are multiple cookie options.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-03-17