mirror of
https://github.com/curl/curl.git
synced 2026-08-04 22:26:13 +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
30
lib/gopher.c
30
lib/gopher.c
|
|
@ -172,7 +172,7 @@ static CURLcode gopher_do(struct Curl_easy *data, bool *done)
|
|||
* connect-command-download protocols.
|
||||
*/
|
||||
|
||||
static const struct Curl_protocol Curl_protocol_gopher = {
|
||||
const struct Curl_protocol Curl_protocol_gopher = {
|
||||
ZERO_NULL, /* setup_connection */
|
||||
gopher_do, /* do_it */
|
||||
ZERO_NULL, /* done */
|
||||
|
|
@ -193,7 +193,7 @@ static const struct Curl_protocol Curl_protocol_gopher = {
|
|||
};
|
||||
|
||||
#ifdef USE_SSL
|
||||
static const struct Curl_protocol Curl_protocol_gophers = {
|
||||
const struct Curl_protocol Curl_protocol_gophers = {
|
||||
ZERO_NULL, /* setup_connection */
|
||||
gopher_do, /* do_it */
|
||||
ZERO_NULL, /* done */
|
||||
|
|
@ -215,29 +215,3 @@ static const struct Curl_protocol Curl_protocol_gophers = {
|
|||
#endif
|
||||
|
||||
#endif /* CURL_DISABLE_GOPHER */
|
||||
|
||||
const struct Curl_scheme Curl_scheme_gopher = {
|
||||
"gopher", /* scheme */
|
||||
#ifdef CURL_DISABLE_GOPHER
|
||||
ZERO_NULL,
|
||||
#else
|
||||
&Curl_protocol_gopher,
|
||||
#endif
|
||||
CURLPROTO_GOPHER, /* protocol */
|
||||
CURLPROTO_GOPHER, /* family */
|
||||
PROTOPT_NONE, /* flags */
|
||||
PORT_GOPHER, /* defport */
|
||||
};
|
||||
|
||||
const struct Curl_scheme Curl_scheme_gophers = {
|
||||
"gophers", /* scheme */
|
||||
#if defined(CURL_DISABLE_GOPHER) || !defined(USE_SSL)
|
||||
ZERO_NULL,
|
||||
#else
|
||||
&Curl_protocol_gophers,
|
||||
#endif
|
||||
CURLPROTO_GOPHERS, /* protocol */
|
||||
CURLPROTO_GOPHER, /* family */
|
||||
PROTOPT_SSL, /* flags */
|
||||
PORT_GOPHER, /* defport */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue