You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2023/10/16 10:55:03 UTC
[PATCH] fix mod_h2 with older nghttp2
Looks like this broke with the websockets backport. mod_h2 is failing to
compile on versions of nghttp2 without
NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL - looks like this was added in
nghttp2 v1.34.0 [1] so how about something like this, or is there a
better way?
(configure check for a declaration is messier)
diff --git a/modules/http2/h2.h b/modules/http2/h2.h
index cfecb3d9a3..06e7087c04 100644
--- a/modules/http2/h2.h
+++ b/modules/http2/h2.h
@@ -20,6 +20,8 @@
#include <apr_version.h>
#include <ap_mmn.h>
+#include <nghttp2/nghttp2ver.h>
+
struct h2_session;
struct h2_stream;
@@ -39,7 +41,7 @@ struct h2_stream;
#define H2_USE_POLLFD_FROM_CONN 0
#endif
-#if H2_USE_PIPES
+#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200
#define H2_USE_WEBSOCKETS 1
#else
#define H2_USE_WEBSOCKETS 0
[1] https://github.com/nghttp2/nghttp2/milestone/30?closed=1
Re: [PATCH] fix mod_h2 with older nghttp2
Posted by Stefan Eissing via dev <de...@httpd.apache.org>.
> Am 16.10.2023 um 14:38 schrieb Joe Orton <jo...@redhat.com>:
>
> BTW is modules/http2 really CTR for 2.4.x? STATUS says only
> mod_proxy_http2 is.
I have made peace with myself to spend afterlife in hell.
> Anyway: I am +1 for r1913005 and r1913019 for 2.4.x, latter was
> sufficient to get 2.4 building on RHEL8 again (if only we had a CI to do
> this, oh...).
>
The apr_encode.h is needed on my machine. Leaving it in.
> Regards, Joe
>
Re: [PATCH] fix mod_h2 with older nghttp2
Posted by Ruediger Pluem <rp...@apache.org>.
On 10/16/23 2:38 PM, Joe Orton wrote:
> BTW is modules/http2 really CTR for 2.4.x? STATUS says only
> mod_proxy_http2 is.
>
> Anyway: I am +1 for r1913005 and r1913019 for 2.4.x, latter was
> sufficient to get 2.4 building on RHEL8 again (if only we had a CI to do
> this, oh...).
I am also +1 on 1913020.
Regards
RĂ¼diger
Re: [PATCH] fix mod_h2 with older nghttp2
Posted by Joe Orton <jo...@redhat.com>.
BTW is modules/http2 really CTR for 2.4.x? STATUS says only
mod_proxy_http2 is.
Anyway: I am +1 for r1913005 and r1913019 for 2.4.x, latter was
sufficient to get 2.4 building on RHEL8 again (if only we had a CI to do
this, oh...).
Regards, Joe
Re: [PATCH] fix mod_h2 with older nghttp2
Posted by Ruediger Pluem <rp...@apache.org>.
I will do.
Regards
RĂ¼diger
On 10/16/23 1:13 PM, Stefan Eissing via dev wrote:
> I added that patch to trunk and merged it into 2.4.x.
>
> I'll make another release candidate soonish. Someone wants to merge the back ports idling in STATUS?
>
> Cheers,
> Stefan
>
>> Am 16.10.2023 um 12:55 schrieb Joe Orton <jo...@redhat.com>:
>>
>> Looks like this broke with the websockets backport. mod_h2 is failing to
>> compile on versions of nghttp2 without
>> NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL - looks like this was added in
>> nghttp2 v1.34.0 [1] so how about something like this, or is there a
>> better way?
>>
>> (configure check for a declaration is messier)
>>
>> diff --git a/modules/http2/h2.h b/modules/http2/h2.h
>> index cfecb3d9a3..06e7087c04 100644
>> --- a/modules/http2/h2.h
>> +++ b/modules/http2/h2.h
>> @@ -20,6 +20,8 @@
>> #include <apr_version.h>
>> #include <ap_mmn.h>
>>
>> +#include <nghttp2/nghttp2ver.h>
>> +
>> struct h2_session;
>> struct h2_stream;
>>
>> @@ -39,7 +41,7 @@ struct h2_stream;
>> #define H2_USE_POLLFD_FROM_CONN 0
>> #endif
>>
>> -#if H2_USE_PIPES
>> +#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200
>> #define H2_USE_WEBSOCKETS 1
>> #else
>> #define H2_USE_WEBSOCKETS 0
>>
>>
>>
>> [1] https://github.com/nghttp2/nghttp2/milestone/30?closed=1
>>
>
>
Re: [PATCH] fix mod_h2 with older nghttp2
Posted by Stefan Eissing via dev <de...@httpd.apache.org>.
I added that patch to trunk and merged it into 2.4.x.
I'll make another release candidate soonish. Someone wants to merge the back ports idling in STATUS?
Cheers,
Stefan
> Am 16.10.2023 um 12:55 schrieb Joe Orton <jo...@redhat.com>:
>
> Looks like this broke with the websockets backport. mod_h2 is failing to
> compile on versions of nghttp2 without
> NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL - looks like this was added in
> nghttp2 v1.34.0 [1] so how about something like this, or is there a
> better way?
>
> (configure check for a declaration is messier)
>
> diff --git a/modules/http2/h2.h b/modules/http2/h2.h
> index cfecb3d9a3..06e7087c04 100644
> --- a/modules/http2/h2.h
> +++ b/modules/http2/h2.h
> @@ -20,6 +20,8 @@
> #include <apr_version.h>
> #include <ap_mmn.h>
>
> +#include <nghttp2/nghttp2ver.h>
> +
> struct h2_session;
> struct h2_stream;
>
> @@ -39,7 +41,7 @@ struct h2_stream;
> #define H2_USE_POLLFD_FROM_CONN 0
> #endif
>
> -#if H2_USE_PIPES
> +#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200
> #define H2_USE_WEBSOCKETS 1
> #else
> #define H2_USE_WEBSOCKETS 0
>
>
>
> [1] https://github.com/nghttp2/nghttp2/milestone/30?closed=1
>