]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge of /httpd/httpd/trunk:r1913023
authorStefan Eissing <icing@apache.org>
Mon, 16 Oct 2023 13:21:37 +0000 (13:21 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 16 Oct 2023 13:21:37 +0000 (13:21 +0000)
* modules/http2: Make WebSockets support conditional also
 on APR 1.7.x since apr_encode.h is required. Restore
 #include "apr_encode.h" removed in previous commit.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1913024 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2.h
modules/http2/h2_ws.c

index 3d1cae0f0662bad428418dd9ae781aeb13587a76..f496a6dcb2bd1bf21b21935978627606d2160328 100644 (file)
@@ -41,7 +41,9 @@ struct h2_stream;
 #define H2_USE_POLLFD_FROM_CONN 0
 #endif
 
-#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200
+/* WebSockets support requires apr 1.7.0 for apr_encode.h, plus the
+ * WebSockets features of nghttp2 1.34.0 and later. */
+#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200 && APR_VERSION_AT_LEAST(1,7,0)
 #define H2_USE_WEBSOCKETS       1
 #else
 #define H2_USE_WEBSOCKETS       0
index e243216783547e4252f634bdb81667db238cd4ae..af65a0e52326e9a8bf4609501e26e4ab219777a8 100644 (file)
@@ -45,6 +45,8 @@
 
 #if H2_USE_WEBSOCKETS
 
+#include "apr_encode.h" /* H2_USE_WEBSOCKETS is conditional on APR 1.6+ */
+
 static ap_filter_rec_t *c2_ws_out_filter_handle;
 
 struct ws_filter_ctx {