cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Help with basic auth problem?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 7 Oct 2014 23:10:23 +0200 (CEST)

On Tue, 7 Oct 2014, Steve Holme wrote:

> Certainly with a GET request I would expect to see the following in your log:
>
> * An initial request for the page or resource that is in your url

> * The server will the respond with a 401 and set the appropriate
> WWW-Authentication headers (listing Basic with the realm option - like the
> response you received did)

That's only what libcurl does if you ask for more than one auth type. If you
only ask for Basic, then libcurl will provide the correct header at once and
it should work on the first shot.

If that fails (== a 401 is returned), then the server didn't accept the given
user+password. Period.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-07