nghttp2: Implement minimum required version 1.11.0

All currently supported Linux distributions have a version greater
than 1.11.0 (and our macOS and Windows versions are also much greater),
and this allows us to use nghttp2_hd_inflate_hd2(), which replaced the
deprecated nghttp2_hd_inflate_hd()
This commit is contained in:
John Thacker 2022-04-23 21:19:43 -04:00
parent e5e78d5da9
commit 91987dc0ab
2 changed files with 1 additions and 16 deletions

View File

@ -1280,7 +1280,7 @@ ws_find_package(SNAPPY ENABLE_SNAPPY HAVE_SNAPPY)
ws_find_package(ZSTD ENABLE_ZSTD HAVE_ZSTD "1.0.0")
# Enhanced HTTP/2 dissection
ws_find_package(NGHTTP2 ENABLE_NGHTTP2 HAVE_NGHTTP2)
ws_find_package(NGHTTP2 ENABLE_NGHTTP2 HAVE_NGHTTP2 "1.11.0")
# Embedded Lua interpreter
ws_find_package(LUA ENABLE_LUA HAVE_LUA "5.1")

View File

@ -1849,21 +1849,6 @@ try_add_named_header_field(proto_tree *tree, tvbuff_t *tvb, int offset, guint32
}
}
#if NGHTTP2_VERSION_NUM < 0x010B00 /* 1.11.0 */
static inline ssize_t nghttp2_hd_inflate_hd2(nghttp2_hd_inflater *inflater,
nghttp2_nv *nv_out,
int *inflate_flags,
const uint8_t *in, size_t inlen,
int in_final)
{
DIAG_OFF(cast-qual)
uint8_t *in_buf = (uint8_t *)in;
DIAG_ON(cast-qual)
return nghttp2_hd_inflate_hd(inflater, nv_out, inflate_flags, in_buf, inlen,
in_final);
}
#endif
static void
fix_partial_header_dissection_support(nghttp2_hd_inflater *hd_inflater, gboolean *fix_it)
{