diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-06-15 13:40:02 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-06-15 13:40:02 +0200 |
commit | 54084aec6701c16d06486df566448eae22092c10 (patch) | |
tree | 51835f56f03087adf81c15f9cc85c8debfa95fe8 /lib/http.c | |
parent | 4d1147ae20756925ccd6e2d4ace31fe92ae0d681 (diff) | |
download | curl-bagder/http-options.tar.gz |
http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASHbagder/http-options
... to enable sending "OPTIONS *" which wasn't possible previously.
This option currently only works for HTTP.
Added test case 1299 to verify
Fixes #1280
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index c65cb58d2..2d04705ba 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1851,6 +1851,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) case HTTPREQ_PUT: request = "PUT"; break; + case HTTPREQ_OPTIONS: + request = "OPTIONS"; + break; default: /* this should never happen */ case HTTPREQ_GET: request = "GET"; @@ -2266,6 +2269,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; + if(data->set.strip_path_slash) + ppath++; + /* url */ if(paste_ftp_userpwd) result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s", |