mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
CUSTOMREQUEST: shouldn't be disabled when HTTP is disabled
... since FTP is using it as well, and potentially other protocols! Also, an #endif CURL_DISABLE_HTTP was incorrectly marked, as it seems to end the proxy block instead.
This commit is contained in:
parent
7abf3b97fe
commit
181b08babb
31
lib/url.c
31
lib/url.c
@ -1404,19 +1404,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
data->set.httpversion = va_arg(param, long);
|
data->set.httpversion = va_arg(param, long);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CURLOPT_CUSTOMREQUEST:
|
|
||||||
/*
|
|
||||||
* Set a custom string to use as request
|
|
||||||
*/
|
|
||||||
result = setstropt(&data->set.str[STRING_CUSTOMREQUEST],
|
|
||||||
va_arg(param, char *));
|
|
||||||
|
|
||||||
/* we don't set
|
|
||||||
data->set.httpreq = HTTPREQ_CUSTOM;
|
|
||||||
here, we continue as if we were using the already set type
|
|
||||||
and this just changes the actual request keyword */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CURLOPT_HTTPAUTH:
|
case CURLOPT_HTTPAUTH:
|
||||||
/*
|
/*
|
||||||
* Set HTTP Authentication type BITMASK.
|
* Set HTTP Authentication type BITMASK.
|
||||||
@ -1448,6 +1435,21 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#endif /* CURL_DISABLE_HTTP */
|
||||||
|
|
||||||
|
case CURLOPT_CUSTOMREQUEST:
|
||||||
|
/*
|
||||||
|
* Set a custom string to use as request
|
||||||
|
*/
|
||||||
|
result = setstropt(&data->set.str[STRING_CUSTOMREQUEST],
|
||||||
|
va_arg(param, char *));
|
||||||
|
|
||||||
|
/* we don't set
|
||||||
|
data->set.httpreq = HTTPREQ_CUSTOM;
|
||||||
|
here, we continue as if we were using the already set type
|
||||||
|
and this just changes the actual request keyword */
|
||||||
|
break;
|
||||||
|
|
||||||
#ifndef CURL_DISABLE_PROXY
|
#ifndef CURL_DISABLE_PROXY
|
||||||
case CURLOPT_HTTPPROXYTUNNEL:
|
case CURLOPT_HTTPPROXYTUNNEL:
|
||||||
/*
|
/*
|
||||||
@ -1492,7 +1494,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
data->set.proxyauth = auth;
|
data->set.proxyauth = auth;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* CURL_DISABLE_HTTP */
|
|
||||||
|
|
||||||
case CURLOPT_PROXY:
|
case CURLOPT_PROXY:
|
||||||
/*
|
/*
|
||||||
@ -1532,7 +1533,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
|
||||||
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
|
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
|
||||||
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
|
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
|
||||||
|
Loading…
Reference in New Issue
Block a user