From: Stefan Eissing Date: Wed, 13 Oct 2021 13:29:28 +0000 (+0000) Subject: * mod_http2: I regret my decision to have removed nghttp2 feature checks... X-Git-Tag: 2.5.0-alpha2-ci-test-only~740 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01650d5294473ae1129e67453c80da5989107af9;p=thirdparty%2Fapache%2Fhttpd.git * mod_http2: I regret my decision to have removed nghttp2 feature checks... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894192 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 60a5e3707dc..f17f1d92b86 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -602,6 +602,7 @@ static int on_frame_send_cb(nghttp2_session *ngh2, return 0; } +#ifdef H2_NG2_INVALID_HEADER_CB static int on_invalid_header_cb(nghttp2_session *ngh2, const nghttp2_frame *frame, const uint8_t *name, size_t namelen, @@ -622,6 +623,7 @@ static int on_invalid_header_cb(nghttp2_session *ngh2, } return 0; } +#endif static ssize_t select_padding_cb(nghttp2_session *ngh2, const nghttp2_frame *frame, @@ -676,7 +678,9 @@ static apr_status_t init_callbacks(conn_rec *c, nghttp2_session_callbacks **pcb) NGH2_SET_CALLBACK(*pcb, on_header, on_header_cb); NGH2_SET_CALLBACK(*pcb, send_data, on_send_data_cb); NGH2_SET_CALLBACK(*pcb, on_frame_send, on_frame_send_cb); +#ifdef H2_NG2_INVALID_HEADER_CB NGH2_SET_CALLBACK(*pcb, on_invalid_header, on_invalid_header_cb); +#endif NGH2_SET_CALLBACK(*pcb, select_padding, select_padding_cb); return APR_SUCCESS; }