WebSockets: make support official (non-experimental)

Inverts the configure/cmake options to instead provide options that
disable WebSockets and have them (ws + wss) enabled by default.

Closes #14936
This commit is contained in:
Daniel Stenberg 2024-09-27 13:19:55 +02:00
parent cfae354a9a
commit d78e129d50
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
26 changed files with 108 additions and 107 deletions

View file

@ -1509,7 +1509,7 @@ const struct Curl_handler *Curl_getn_scheme_handler(const char *scheme,
#else
NULL,
#endif
#if defined(USE_WEBSOCKETS) && \
#if !defined(CURL_DISABLE_WEBSOCKETS) && \
defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)
&Curl_handler_wss,
#else
@ -1578,7 +1578,7 @@ const struct Curl_handler *Curl_getn_scheme_handler(const char *scheme,
NULL,
#endif
NULL,
#if defined(USE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)
#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)
&Curl_handler_ws,
#else
NULL,
@ -2102,7 +2102,7 @@ static char *detect_proxy(struct Curl_easy *data,
}
if(!proxy) {
#ifdef USE_WEBSOCKETS
#ifndef CURL_DISABLE_WEBSOCKETS
/* websocket proxy fallbacks */
if(strcasecompare("ws_proxy", proxy_env)) {
proxy = curl_getenv("http_proxy");
@ -2120,7 +2120,7 @@ static char *detect_proxy(struct Curl_easy *data,
envp = (char *)"ALL_PROXY";
proxy = curl_getenv(envp);
}
#ifdef USE_WEBSOCKETS
#ifndef CURL_DISABLE_WEBSOCKETS
}
#endif
}