aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorDavid Morsberger <dave@morsberger.com>2016-01-13 21:09:18 -0500
committerMichael Mann <mmann78@netscape.net>2016-01-15 12:33:14 +0000
commit7002a9cb3f23f2af2c95352d01eb557753d299c5 (patch)
tree9db1bc0907d8512b7054b659b3d0d61708bc1ad1 /epan
parentd1cb746822a31dc2d3273984587ce1ad2756ee7c (diff)
Add http.file_data string field to store decompressed HTTP data.
Change-Id: I6031ae6f9b31447665236098c87ffed97e4b8a2d Reviewed-on: https://code.wireshark.org/review/13275 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-http.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 3f3544d6bd..705f325fd7 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -129,6 +129,7 @@ static int hf_http_time = -1;
static int hf_http_chunk_size = -1;
static int hf_http_chunk_boundary = -1;
static int hf_http_chunked_trailer_part = -1;
+static int hf_http_file_data = -1;
static int hf_http_unknown_header = -1;
static gint ett_http = -1;
@@ -1290,6 +1291,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
tvbuff_t *next_tvb;
guint chunked_datalen = 0;
char *media_str = NULL;
+ const gchar *file_data;
/*
* Create a tvbuff for the payload.
@@ -1457,6 +1459,9 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
if(have_tap_listener(http_follow_tap)) {
tap_queue_packet(http_follow_tap, pinfo, next_tvb);
}
+ file_data = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_reported_length(next_tvb), ENC_ASCII);
+ proto_tree_add_string_format_value(http_tree, hf_http_file_data,
+ next_tvb, 0, tvb_reported_length(next_tvb), file_data, "%u bytes", tvb_reported_length(next_tvb));
/*
* Do subdissector checks.
@@ -3367,7 +3372,11 @@ proto_register_http(void)
NULL, HFILL }},
{ &hf_http_chunk_size,
{ "Chunk size", "http.chunk_size",
- FT_UINT32, BASE_DEC, NULL, 0,
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+ { &hf_http_file_data,
+ { "File Data", "http.file_data",
+ FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{ &hf_http_unknown_header,
{ "Unknown header", "http.unknown_header",