diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-03-23 10:51:49 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-24 10:31:58 +0100 |
commit | 5d2327929932bb18b0c683583f398855f0a31fed (patch) | |
tree | cb6025b9b090e99b80716b4daba080f3970a33ed /src | |
parent | ecc4940df2c286702262f8c21d7369f893e78968 (diff) |
CURLOPT_PATH_AS_IS: added
--path-as-is is the command line option
Added docs in curl.1 and CURLOPT_PATH_AS_IS.3
Added test in test 1241
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_cfgable.h | 5 | ||||
-rw-r--r-- | src/tool_getparam.c | 4 | ||||
-rw-r--r-- | src/tool_help.c | 1 | ||||
-rw-r--r-- | src/tool_operate.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index e851130f4..d1f223871 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -206,9 +206,8 @@ struct OperationConfig { bool nonpn; /* enable/disable TLS NPN extension */ bool noalpn; /* enable/disable TLS ALPN extension */ char *unix_socket_path; /* path to Unix domain socket */ - bool falsestart; - + bool path_as_is; struct GlobalConfig *global; struct OperationConfig *prev; struct OperationConfig *next; /* Always last in the struct */ diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 56aa03050..7f68b2852 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -177,6 +177,7 @@ static const struct LongShort aliases[]= { {"$K", "sasl-ir", FALSE}, {"$L", "test-event", FALSE}, {"$M", "unix-socket", TRUE}, + {"$N", "path-as-is", FALSE}, {"0", "http1.0", FALSE}, {"01", "http1.1", FALSE}, {"02", "http2", FALSE}, @@ -982,6 +983,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ case 'M': /* --unix-socket */ GetStr(&config->unix_socket_path, nextarg); break; + case 'N': /* --path-as-is */ + config->path_as_is = toggle; + break; } break; case '#': /* --progress-bar */ diff --git a/src/tool_help.c b/src/tool_help.c index 69778b91a..bb7aa7c3a 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -154,6 +154,7 @@ static const char *const helptext[] = { " --oauth2-bearer TOKEN OAuth 2 Bearer Token (IMAP, POP3, SMTP)", " -o, --output FILE Write to FILE instead of stdout", " --pass PASS Pass phrase for the private key (SSL/SSH)", + " --path-as-is Do not squash .. sequences in URL path", " --pinnedpubkey FILE Public key (PEM/DER) to verify peer against " "(OpenSSL/GnuTLS/GSKit only)", " --post301 " diff --git a/src/tool_operate.c b/src/tool_operate.c index e2ae22e54..33a9520f9 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1045,6 +1045,8 @@ static CURLcode operate_do(struct GlobalConfig *global, if(config->falsestart) my_setopt(curl, CURLOPT_SSL_FALSESTART, 1L); } + if(config->path_as_is) + my_setopt(curl, CURLOPT_PATH_AS_IS, 1L); if(built_in_protos & (CURLPROTO_SCP|CURLPROTO_SFTP)) { if(!config->insecure_ok) { |