curl_easy_setopt: Added the ability to set the login options separately

Rather than set the authentication options as part of the login details
specified in the URL, or via the older CURLOPT_USERPWD option, added a
new libcurl option to allow the login options to be set separately.
This commit is contained in:
Steve Holme 2013-11-12 19:01:04 +00:00
parent 6901861fc9
commit f2584627c8
8 changed files with 37 additions and 7 deletions

View file

@ -827,10 +827,10 @@ typedef enum {
/* Name of proxy to use. */
CINIT(PROXY, OBJECTPOINT, 4),
/* "name:password" to use when fetching. */
/* "user:password;options" to use when fetching. */
CINIT(USERPWD, OBJECTPOINT, 5),
/* "name:password" to use with proxy. */
/* "user:password" to use with proxy. */
CINIT(PROXYUSERPWD, OBJECTPOINT, 6),
/* Range to get, specified as an ASCII string. */
@ -1569,6 +1569,9 @@ typedef enum {
* Only supported by the c-ares DNS backend */
CINIT(DNS_LOCAL_IP6, OBJECTPOINT, 223),
/* Set authentication options directly */
CINIT(OPTIONS, OBJECTPOINT, 224),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;

View file

@ -269,6 +269,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
(option) == CURLOPT_DNS_INTERFACE || \
(option) == CURLOPT_DNS_LOCAL_IP4 || \
(option) == CURLOPT_DNS_LOCAL_IP6 || \
(option) == CURLOPT_OPTIONS || \
0)
/* evaluates to true if option takes a curl_write_callback argument */