diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS.md b/docs/libcurl/opts/CURLOPT_PROTOCOLS.md index f64faa2684..0d5fca78af 100644 --- a/docs/libcurl/opts/CURLOPT_PROTOCOLS.md +++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.md @@ -35,8 +35,10 @@ Pass a long that holds a bitmask of protocol bits. If used, this bitmask limits what protocols libcurl may use in the transfer. This allows you to have a libcurl built to support a wide range of protocols but still limit specific transfers to only be allowed to use a subset of them. By default libcurl -accepts all protocols it supports (*CURLPROTO_ALL*). See also -CURLOPT_REDIR_PROTOCOLS(3). +accepts all protocols it supports. See also CURLOPT_REDIR_PROTOCOLS(3). + +Note that the old define *CURLPROTO_ALL* no longer enables all protocols a +modern curl might support! These are the available protocol defines: ~~~c @@ -52,7 +54,6 @@ CURLPROTO_IMAPS CURLPROTO_LDAP CURLPROTO_LDAPS CURLPROTO_MQTT -CURLPROTO_MQTTS CURLPROTO_POP3 CURLPROTO_POP3S CURLPROTO_RTMP diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.md b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.md index b7340b00c2..f8c45519fb 100644 --- a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.md +++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.md @@ -59,7 +59,6 @@ CURLPROTO_IMAPS CURLPROTO_LDAP CURLPROTO_LDAPS CURLPROTO_MQTT -CURLPROTO_MQTTS CURLPROTO_POP3 CURLPROTO_POP3S CURLPROTO_RTMP diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index d88d45504a..fe875c453d 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -968,7 +968,6 @@ CURLPROTO_IMAPS 7.20.0 CURLPROTO_LDAP 7.19.4 CURLPROTO_LDAPS 7.19.4 CURLPROTO_MQTT 7.71.0 -CURLPROTO_MQTTS 8.19.0 CURLPROTO_POP3 7.20.0 CURLPROTO_POP3S 7.20.0 CURLPROTO_RTMP 7.21.0 diff --git a/include/curl/curl.h b/include/curl/curl.h index 827fb1badf..40c298c382 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1103,8 +1103,8 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy, #define CURLPROTO_SMBS (1L << 27) #define CURLPROTO_MQTT (1L << 28) #define CURLPROTO_GOPHERS (1L << 29) -#define CURLPROTO_MQTTS (1L << 30) -#define CURLPROTO_ALL ((unsigned long)0xffffffff) /* enable everything */ +#define CURLPROTO_ALL ((unsigned long)0xffffffff) /* old-style enable + "everything" */ /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ diff --git a/lib/setopt.c b/lib/setopt.c index ea69ccd821..84f3e02b7b 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2365,7 +2365,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, } else /* make a NULL argument reset to default */ - s->allowed_protocols = (curl_prot_t)CURLPROTO_ALL; + s->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL; break; case CURLOPT_REDIR_PROTOCOLS_STR: if(ptr) { diff --git a/lib/url.c b/lib/url.c index 93e361deea..c2cd440ed4 100644 --- a/lib/url.c +++ b/lib/url.c @@ -400,7 +400,7 @@ void Curl_init_userdefined(struct Curl_easy *data) #endif set->new_file_perms = 0644; /* Default permissions */ - set->allowed_protocols = (curl_prot_t) CURLPROTO_ALL; + set->allowed_protocols = (curl_prot_t) CURLPROTO_64ALL; set->redir_protocols = CURLPROTO_REDIR; #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) diff --git a/lib/urldata.h b/lib/urldata.h index 138405c3f3..b45d75169a 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -74,18 +74,15 @@ #define CURLPROTO_WSS 0L #endif +#define CURLPROTO_MQTTS (1LL << 32) + +#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff) + /* the default protocols accepting a redirect to */ #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \ CURLPROTO_FTPS) -/* This should be undefined once we need bit 32 or higher */ -#define PROTO_TYPE_SMALL - -#ifndef PROTO_TYPE_SMALL typedef curl_off_t curl_prot_t; -#else -typedef uint32_t curl_prot_t; -#endif /* This mask is for all the old protocols that are provided and defined in the public header and shall exclude protocols added since which are not exposed