curl: two new command line options for etags

--etag-compare and --etag-save

Suggested-by: Paul Hoffman
Fixes #4277
Closes #4543
This commit is contained in:
Maros Priputen 2019-10-30 09:43:14 +01:00 committed by Daniel Stenberg
parent 1ff63fa69b
commit 18e5cb77e9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 390 additions and 3 deletions

View file

@ -268,6 +268,8 @@ static const struct LongShort aliases[]= {
{"E9", "proxy-tlsv1", ARG_NONE},
{"EA", "socks5-basic", ARG_BOOL},
{"EB", "socks5-gssapi", ARG_BOOL},
{"EC", "etag-save", ARG_FILENAME},
{"ED", "etag-compare", ARG_FILENAME},
{"f", "fail", ARG_BOOL},
{"fa", "fail-early", ARG_BOOL},
{"fb", "styled-output", ARG_BOOL},
@ -1697,6 +1699,14 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
config->socks5_auth &= ~CURLAUTH_GSSAPI;
break;
case 'C':
GetStr(&config->etag_save_file, nextarg);
break;
case 'D':
GetStr(&config->etag_compare_file, nextarg);
break;
default: /* unknown flag */
return PARAM_OPTION_UNKNOWN;
}