summaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-19 14:10:33 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-19 16:39:22 +0200
commitb778ae4c5e5bcb6da4de789e25971f40f0673d86 (patch)
tree6a710c4bf1a37e78a5b613109af46dd6762369bd /src/tool_getparam.c
parent176ec5138277fcda592fa604e499dfd6819eece9 (diff)
downloadcurl-b778ae4c5e5bcb6da4de789e25971f40f0673d86.tar.gz
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
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index bcb9e1ee2..642bba832 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -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 */