mirror of
https://github.com/curl/curl.git
synced 2026-07-14 00:17:18 +03:00
http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASH
... to enable sending "OPTIONS *" which wasn't possible previously. This option currently only works for HTTP. Added test cases 1298 + 1299 to verify Fixes #1280 Closes #1462
This commit is contained in:
parent
176ec51382
commit
b778ae4c5e
21 changed files with 220 additions and 25 deletions
|
|
@ -257,6 +257,7 @@ static const struct LongShort aliases[]= {
|
|||
{"Fs", "form-string", ARG_STRING},
|
||||
{"g", "globoff", ARG_BOOL},
|
||||
{"G", "get", ARG_NONE},
|
||||
{"Ga", "strip-path-slash", ARG_BOOL},
|
||||
{"h", "help", ARG_BOOL},
|
||||
{"H", "header", ARG_STRING},
|
||||
{"Hp", "proxy-header", ARG_STRING},
|
||||
|
|
@ -1591,7 +1592,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
break;
|
||||
|
||||
case 'G': /* HTTP GET */
|
||||
config->use_httpget = TRUE;
|
||||
if(subletter == 'a') { /* --strip-path-slash */
|
||||
config->strip_path_slash = TRUE;
|
||||
}
|
||||
else
|
||||
config->use_httpget = TRUE;
|
||||
break;
|
||||
|
||||
case 'h': /* h for help */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue