mirror of
https://github.com/curl/curl.git
synced 2026-08-01 20:10:29 +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
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue