mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:43:37 +03:00
setopt: add CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR
... as replacements for deprecated CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS as these new ones do not risk running into the 32 bit limit the old ones are facing. CURLINFO_PROTCOOL is now deprecated. The curl tool is updated to use the new options. Added test 1597 to verify the libcurl protocol parser. Closes #8992
This commit is contained in:
parent
193215db3c
commit
e6f8445ede
24 changed files with 487 additions and 45 deletions
|
|
@ -1184,12 +1184,16 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
break;
|
||||
case 'D': /* --proto */
|
||||
config->proto_present = TRUE;
|
||||
if(proto2num(config, &config->proto, nextarg))
|
||||
return PARAM_BAD_USE;
|
||||
err = proto2num(config, (unsigned int)CURLPROTO_ALL,
|
||||
&config->proto_str, nextarg);
|
||||
if(err)
|
||||
return err;
|
||||
break;
|
||||
case 'E': /* --proto-redir */
|
||||
config->proto_redir_present = TRUE;
|
||||
if(proto2num(config, &config->proto_redir, nextarg))
|
||||
if(proto2num(config, CURLPROTO_HTTP|CURLPROTO_HTTPS|
|
||||
CURLPROTO_FTP|CURLPROTO_FTPS,
|
||||
&config->proto_redir_str, nextarg))
|
||||
return PARAM_BAD_USE;
|
||||
break;
|
||||
case 'F': /* --resolve */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue