mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:43:34 +03:00
lib: separate scheme info from protocol implementation
This allows builds know about all schemes - but only have the protocol implementations for those actually built-in. It further allows multiple protocols to reuse the same protocol setup and functions for both TLS and non-TLS implementations instead of needing two (or more) structs. The scheme information is now in 'struct Curl_scheme' and all the function pointers for each scheme/protocol implementation are in struct Curl_protocol. The URL API now always work with all known protocols. Closes #20351
This commit is contained in:
parent
63baa10951
commit
8edc0338f3
59 changed files with 831 additions and 1040 deletions
|
|
@ -326,7 +326,7 @@ CURLcode Curl_headers_init(struct Curl_easy *data)
|
|||
struct Curl_cwriter *writer;
|
||||
CURLcode result;
|
||||
|
||||
if(data->conn && (data->conn->handler->protocol & PROTO_FAMILY_HTTP)) {
|
||||
if(data->conn && (data->conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
|
||||
/* avoid installing it twice */
|
||||
if(Curl_cwriter_get_by_name(data, hds_cw_collect.name))
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue