mirror of
https://github.com/curl/curl.git
synced 2026-08-06 18:06:15 +03:00
protocol source, all about protocols and uri schemes
Add protocol.h and protocol.c containing all about libcurl's known URI schemes and their protocol handlers (so they exist). Moves the scheme definitions from the various sources files into protocol.c. Schemes are known and used, even of the protocol handler is not build or just not implemented at all. Closes #20906
This commit is contained in:
parent
32531f20f9
commit
eb14705280
42 changed files with 1089 additions and 992 deletions
36
lib/http.c
36
lib/http.c
|
|
@ -4996,7 +4996,7 @@ void Curl_http_resp_free(struct http_resp *resp)
|
|||
/*
|
||||
* HTTP handler interface.
|
||||
*/
|
||||
static const struct Curl_protocol Curl_protocol_http = {
|
||||
const struct Curl_protocol Curl_protocol_http = {
|
||||
Curl_http_setup_conn, /* setup_connection */
|
||||
Curl_http, /* do_it */
|
||||
Curl_http_done, /* done */
|
||||
|
|
@ -5017,37 +5017,3 @@ static const struct Curl_protocol Curl_protocol_http = {
|
|||
};
|
||||
|
||||
#endif /* CURL_DISABLE_HTTP */
|
||||
|
||||
/*
|
||||
* HTTP handler interface.
|
||||
*/
|
||||
const struct Curl_scheme Curl_scheme_http = {
|
||||
"http", /* scheme */
|
||||
#ifdef CURL_DISABLE_HTTP
|
||||
ZERO_NULL,
|
||||
#else
|
||||
&Curl_protocol_http,
|
||||
#endif
|
||||
CURLPROTO_HTTP, /* protocol */
|
||||
CURLPROTO_HTTP, /* family */
|
||||
PROTOPT_CREDSPERREQUEST | /* flags */
|
||||
PROTOPT_USERPWDCTRL | PROTOPT_CONN_REUSE,
|
||||
PORT_HTTP, /* defport */
|
||||
};
|
||||
|
||||
/*
|
||||
* HTTPS handler interface.
|
||||
*/
|
||||
const struct Curl_scheme Curl_scheme_https = {
|
||||
"https", /* scheme */
|
||||
#if defined(CURL_DISABLE_HTTP) || !defined(USE_SSL)
|
||||
ZERO_NULL,
|
||||
#else
|
||||
&Curl_protocol_http,
|
||||
#endif
|
||||
CURLPROTO_HTTPS, /* protocol */
|
||||
CURLPROTO_HTTP, /* family */
|
||||
PROTOPT_SSL | PROTOPT_CREDSPERREQUEST | PROTOPT_ALPN | /* flags */
|
||||
PROTOPT_USERPWDCTRL | PROTOPT_CONN_REUSE,
|
||||
PORT_HTTPS, /* defport */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue