diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-03-03 11:17:52 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-03-03 11:17:52 +0100 |
commit | c51c78dd8d93990d7168a7f6b2410ec437e66939 (patch) | |
tree | e45f94c2cf39634c0d4e9a871a13235cdc4d128e /src/tool_getparam.c | |
parent | e1be8254534898fccafc5d6cd04f6235f283cfbd (diff) | |
download | curl-c51c78dd8d93990d7168a7f6b2410ec437e66939.tar.gz |
alt-svc: the curl command line bits
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r-- | src/tool_getparam.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 82ba8b215..b133cb87e 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -214,6 +214,7 @@ static const struct LongShort aliases[]= { {"a", "append", ARG_BOOL}, {"A", "user-agent", ARG_STRING}, {"b", "cookie", ARG_STRING}, + {"ba", "alt-svc", ARG_STRING}, {"B", "use-ascii", ARG_BOOL}, {"c", "cookie-jar", ARG_STRING}, {"C", "continue-at", ARG_STRING}, @@ -1244,17 +1245,23 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ /* This specifies the User-Agent name */ GetStr(&config->useragent, nextarg); break; - case 'b': /* cookie string coming up: */ - if(nextarg[0] == '@') { - nextarg++; - } - else if(strchr(nextarg, '=')) { - /* A cookie string must have a =-letter */ - GetStr(&config->cookie, nextarg); + case 'b': + switch(subletter) { + case 'a': /* --alt-svc */ + GetStr(&config->altsvc, nextarg); break; + default: /* --cookie string coming up: */ + if(nextarg[0] == '@') { + nextarg++; + } + else if(strchr(nextarg, '=')) { + /* A cookie string must have a =-letter */ + GetStr(&config->cookie, nextarg); + break; + } + /* We have a cookie file to read from! */ + GetStr(&config->cookiefile, nextarg); } - /* We have a cookie file to read from! */ - GetStr(&config->cookiefile, nextarg); break; case 'B': /* use ASCII/text when transferring */ |