CURLOPT_USERPWD option.
To specify the password and login options, along with the user name, use the
-\fICURLOPT_PASSWORD\fP and \fICURLOPT_OPTIONS\fP options or alternatively use
-the older \CURLOPT_USERPWD\fP option instead. (Added in 7.19.1)
+\fICURLOPT_PASSWORD\fP and \fICURLOPT_LOGIN_OPTIONS\fP options. (Added in
+7.19.1)
.IP CURLOPT_PASSWORD
Pass a char * as parameter, which should be pointing to the zero terminated
password to use for the transfer.
The CURLOPT_PASSWORD option should be used in conjunction with the
\fICURLOPT_USERNAME\fP option. (Added in 7.19.1)
-.IP CURLOPT_OPTIONS
+.IP CURLOPT_LOGIN_OPTIONS
Pass a char * as parameter, which should be pointing to the zero terminated
options string to use for the transfer.
-\CURLOPT_OPTIONS\fP can be used to set protocol specific authentication options,
-such as the preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", and
-should be used in conjunction with the \fICURLOPT_USERNAME\fP option. (Added in
-7.34.0)
+\CURLOPT_LOGIN_OPTIONS\fP can be used to set protocol specific login options,
+such as the preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*",
+and should be used in conjunction with the \fICURLOPT_USERNAME\fP option.
+(Added in 7.34.0)
.IP CURLOPT_PROXYUSERNAME
Pass a char * as parameter, which should be pointing to the zero terminated
user name to use for the transfer while connecting to Proxy.
CURLOPT_KRBLEVEL 7.16.4
CURLOPT_LOCALPORT 7.15.2
CURLOPT_LOCALPORTRANGE 7.15.2
+CURLOPT_LOGIN_OPTIONS 7.34.0
CURLOPT_LOW_SPEED_LIMIT 7.1
CURLOPT_LOW_SPEED_TIME 7.1
CURLOPT_MAIL_AUTH 7.25.0
CURLOPT_NOTHING 7.1.1 7.11.1 7.11.0
CURLOPT_OPENSOCKETDATA 7.17.1
CURLOPT_OPENSOCKETFUNCTION 7.17.1
-CURLOPT_OPTIONS 7.34.0
CURLOPT_PASSWDDATA 7.4.2 7.11.1 7.15.5
CURLOPT_PASSWDFUNCTION 7.4.2 7.11.1 7.15.5
CURLOPT_PASSWORD 7.19.1
CINIT(DNS_LOCAL_IP6, OBJECTPOINT, 223),
/* Set authentication options directly */
- CINIT(OPTIONS, OBJECTPOINT, 224),
+ CINIT(LOGIN_OPTIONS, OBJECTPOINT, 224),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
(option) == CURLOPT_DNS_INTERFACE || \
(option) == CURLOPT_DNS_LOCAL_IP4 || \
(option) == CURLOPT_DNS_LOCAL_IP6 || \
- (option) == CURLOPT_OPTIONS || \
+ (option) == CURLOPT_LOGIN_OPTIONS || \
0)
/* evaluates to true if option takes a curl_write_callback argument */
return CURLE_OK;
}
-static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp,
- char **optionsp)
+static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp)
{
CURLcode result = CURLE_OK;
char *user = NULL;
char *passwd = NULL;
- char *options = NULL;
/* Parse the login details if specified. It not then we treat NULL as a hint
to clear the existing data */
result = parse_login_details(option, strlen(option),
(userp ? &user : NULL),
(passwdp ? &passwd : NULL),
- (optionsp ? &options : NULL));
+ NULL);
}
if(!result) {
Curl_safefree(*passwdp);
*passwdp = passwd;
}
-
- /* Store the options part of option if required */
- if(optionsp) {
- Curl_safefree(*optionsp);
- *optionsp = options;
- }
}
return result;
case CURLOPT_USERPWD:
/*
- * user:password;options to use in the operation
+ * user:password to use in the operation
*/
result = setstropt_userpwd(va_arg(param, char *),
&data->set.str[STRING_USERNAME],
- &data->set.str[STRING_PASSWORD],
- &data->set.str[STRING_OPTIONS]);
+ &data->set.str[STRING_PASSWORD]);
break;
case CURLOPT_USERNAME:
va_arg(param, char *));
break;
- case CURLOPT_OPTIONS:
+ case CURLOPT_LOGIN_OPTIONS:
/*
* authentication options to use in the operation
*/
*/
result = setstropt_userpwd(va_arg(param, char *),
&data->set.str[STRING_PROXYUSERNAME],
- &data->set.str[STRING_PROXYPASSWORD], NULL);
+ &data->set.str[STRING_PROXYPASSWORD]);
break;
case CURLOPT_PROXYUSERNAME:
/*
CURLOPT_ISSUERCERT
CURLOPT_KEYPASSWD
CURLOPT_KRBLEVEL
+ CURLOPT_LOGIN_OPTIONS
CURLOPT_MAIL_FROM
CURLOPT_MAIL_AUTH
CURLOPT_NETRC_FILE
CURLOPT_NOPROXY
- CURLOPT_OPTIONS
CURLOPT_PASSWORD
CURLOPT_PROXY
CURLOPT_PROXYPASSWORD
case CURLOPT_ISSUERCERT:
case CURLOPT_KEYPASSWD:
case CURLOPT_KRBLEVEL:
+ case CURLOPT_LOGIN_OPTIONS:
case CURLOPT_MAIL_FROM:
case CURLOPT_MAIL_AUTH:
case CURLOPT_NETRC_FILE:
case CURLOPT_NOPROXY:
- case CURLOPT_OPTIONS:
case CURLOPT_PASSWORD:
case CURLOPT_PROXY:
case CURLOPT_PROXYPASSWORD:
d c 10222
d CURLOPT_DNS_LOCAL_IP6...
d c 10223
- d CURLOPT_OPTIONS...
+ d CURLOPT_LOGIN_OPTIONS...
d c 10224
*
/if not defined(CURL_NO_OLDIES)
0 => -s is used to NOT show errors
1 => -S has been used to show errors */
char *userpwd;
+ char *login_options;
char *tls_username;
char *tls_password;
char *tls_authtype;
{"El", "tlspassword", TRUE},
{"Em", "tlsauthtype", TRUE},
{"En", "ssl-allow-beast", FALSE},
+ {"Eo", "login-options", TRUE},
{"f", "fail", FALSE},
{"F", "form", TRUE},
{"Fs", "form-string", TRUE},
else
return PARAM_LIBCURL_DOESNT_SUPPORT;
break;
- case 'n': /* no empty SSL fragments */
+ case 'n': /* no empty SSL fragments, --ssl-allow-beast */
if(curlinfo->features & CURL_VERSION_SSL)
config->ssl_allow_beast = toggle;
break;
+
+ case 'o': /* --login-options */
+ GetStr(&config->login_options, nextarg);
+ break;
+
default: /* certificate file */
{
char *certname, *passphrase;
}
break;
case 'u':
- /* user:password;options */
+ /* user:password */
GetStr(&config->userpwd, nextarg);
cleanarg(nextarg);
break;
my_setopt(curl, CURLOPT_NETRC_FILE, config->netrc_file);
my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii?1L:0L);
+ if(config->login_options)
+ my_setopt_str(curl, CURLOPT_LOGIN_OPTIONS, config->login_options);
my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
my_setopt_str(curl, CURLOPT_RANGE, config->range);
my_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
HTTP over proxy-tunnel with site authentication
</name>
<command>
-http://test.83:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user iam:myself
+http://test.83:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self'
</command>
</client>
</proxy>
<protocol>
GET /we/want/that/page/83 HTTP/1.1\r
-Authorization: Basic aWFtOm15c2VsZg==\r
+Authorization: Basic aWFtOm15OjtzZWxm\r
User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
Host: test.83:%HTTPPORT\r
Accept: */*\r