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 /lib/url.c | |
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 'lib/url.c')
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2613,6 +2613,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, break; #endif + case CURLOPT_PATH_AS_IS: + data->set.path_as_is = (0 != va_arg(param, long))?TRUE:FALSE; + break; default: /* unknown tag and its companion, just ignore: */ result = CURLE_UNKNOWN_OPTION; @@ -4036,7 +4039,7 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, path[0] = '/'; rebuild_url = TRUE; } - else { + else if(!data->set.path_as_is) { /* sanitise paths and remove ../ and ./ sequences according to RFC3986 */ char *newp = Curl_dedotdotify(path); if(!newp) |