mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:03:38 +03:00
curl: error on --alt-svc use w/o support
Make the tool check for alt-svc support at run-time and return error accordingly if not present when the option is used. Reported-by: Harry Sintonen Closes #4878
This commit is contained in:
parent
faaa63f323
commit
1cc97ba6e4
2 changed files with 4 additions and 4 deletions
|
|
@ -1278,7 +1278,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
case 'b':
|
||||
switch(subletter) {
|
||||
case 'a': /* --alt-svc */
|
||||
GetStr(&config->altsvc, nextarg);
|
||||
if(curlinfo->features & CURL_VERSION_ALTSVC)
|
||||
GetStr(&config->altsvc, nextarg);
|
||||
else
|
||||
return PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||
break;
|
||||
default: /* --cookie string coming up: */
|
||||
if(nextarg[0] == '@') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue