cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_HTTPAUTH question

From: Gary Hostetler (ghostetl) <ghostetl_at_cisco.com>
Date: Thu, 5 Mar 2015 18:28:24 +0000

I have a couple of questions regarding this option.

1. If I DO NOT set the CURLOPT_HTTPAUTH option and then use the curl_easy_perform to send a URL, will CURL default to send BASIC or will CURL not send any authentication at all?

2. If no authentication is sent in question 1 and the server responds with a message dictating the need for authentication, for example BASIC, will CURL then respond with BASIC authentication? Or will it hold to the fact that authentication has not been set and close the connection?

3. If the CURLOPT_USERPWD is set with a username/password I understand how it is used when specifying CURLOPT_HTTPAUTH, but back to my first two questions, is it dependent on CURLOPT_HTTPAUTH? Or is there a case where it is provisioned without CURLOPT_HTTPAUTH and will still be used to help default to BASIC Authentication.

Thank you - Gary

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-03-05