http2: show a clear warning when Wireshark lacks nghttp2
HTTP/2 header decompression requires nghttp2, be more helpful to users who did not build Wireshark with appropriate support. Change-Id: I52f79e320cf04bd943e1e8224a613e70ac263579 Reviewed-on: https://code.wireshark.org/review/34584 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
983d7c3a00
commit
001de56561
|
@ -2401,13 +2401,8 @@ dissect_http2_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *http2_tree,
|
|||
|
||||
/* Headers */
|
||||
static int
|
||||
#ifdef HAVE_NGHTTP2
|
||||
dissect_http2_headers(tvbuff_t *tvb, packet_info *pinfo, proto_tree *http2_tree,
|
||||
guint offset, guint8 flags)
|
||||
#else
|
||||
dissect_http2_headers(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *http2_tree,
|
||||
guint offset, guint8 flags)
|
||||
#endif
|
||||
{
|
||||
guint16 padding;
|
||||
gint headlen;
|
||||
|
@ -2453,6 +2448,9 @@ dissect_http2_headers(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *http2_t
|
|||
#ifdef HAVE_NGHTTP2
|
||||
/* decompress the header block */
|
||||
inflate_http2_header_block(tvb, pinfo, offset, http2_tree, headlen, h2session, flags);
|
||||
#else
|
||||
proto_tree_add_expert_format(http2_tree, pinfo, &ei_http2_header_size, tvb, offset, headlen,
|
||||
"Wireshark must be built with nghttp2 for HTTP/2 HEADERS support");
|
||||
#endif
|
||||
|
||||
offset += headlen;
|
||||
|
|
Loading…
Reference in New Issue