diff options
author | Eugene Adell <eugene.adell@gmail.com> | 2017-09-27 14:49:13 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-09-28 00:52:55 +0000 |
commit | 13184fbf3a1490e2ba7c27cf34e458a77bfcc337 (patch) | |
tree | 74bcddcddd7df0fe170aa7fb9e12c025efb7e4bb /epan/dissectors/packet-http.c | |
parent | b30119471711b1aa47d2509a1bec73468990eb66 (diff) |
HTTP: fix the Response Version
Add a distinct field for a version in a response packet,
http.response.version
Bug: 14085
Change-Id: Ib255acf7fc329566869bfb82108826931368701d
Reviewed-on: https://code.wireshark.org/review/23769
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/dissectors/packet-http.c')
-rw-r--r-- | epan/dissectors/packet-http.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 0ff1979019..5fbda8aed0 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -5,6 +5,7 @@ * * Guy Harris <guy@alum.mit.edu> * + * Copyright 2017, Eugene Adell <eugene.adell@gmail.com> * Copyright 2004, Jerry Talkington <jtalkington@users.sourceforge.net> * Copyright 2002, Tim Potter <tpot@samba.org> * Copyright 1999, Andrew Tridgell <tridge@samba.org> @@ -81,7 +82,8 @@ static int hf_http_request_full_uri = -1; static int hf_http_request_path = -1; static int hf_http_request_query = -1; static int hf_http_request_query_parameter = -1; -static int hf_http_version = -1; +static int hf_http_request_version = -1; +static int hf_http_response_version = -1; static int hf_http_response_code = -1; static int hf_http_response_code_desc = -1; static int hf_http_response_phrase = -1; @@ -1730,7 +1732,7 @@ basic_request_dissector(tvbuff_t *tvb, proto_tree *tree, int offset, /* Everything to the end of the line is the version. */ tokenlen = (int) (lineend - line); - proto_tree_add_item(tree, hf_http_version, tvb, offset, tokenlen, + proto_tree_add_item(tree, hf_http_request_version, tvb, offset, tokenlen, ENC_ASCII|ENC_NA); } @@ -1750,7 +1752,7 @@ basic_response_dissector(tvbuff_t *tvb, proto_tree *tree, int offset, tokenlen = get_token_len(line, lineend, &next_token); if (tokenlen == 0) return; - proto_tree_add_item(tree, hf_http_version, tvb, offset, tokenlen, + proto_tree_add_item(tree, hf_http_response_version, tvb, offset, tokenlen, ENC_ASCII|ENC_NA); /* Advance to the start of the next token. */ offset += (int) (next_token - line); @@ -3406,10 +3408,14 @@ proto_register_http(void) { "Request URI Query Parameter", "http.request.uri.query.parameter", FT_STRING, STR_UNICODE, NULL, 0x0, "HTTP Request-URI Query Parameter", HFILL }}, - { &hf_http_version, + { &hf_http_request_version, { "Request Version", "http.request.version", FT_STRING, BASE_NONE, NULL, 0x0, "HTTP Request HTTP-Version", HFILL }}, + { &hf_http_response_version, + { "Response Version", "http.response.version", + FT_STRING, BASE_NONE, NULL, 0x0, + "HTTP Response HTTP-Version", HFILL }}, { &hf_http_request_full_uri, { "Full request URI", "http.request.full_uri", FT_STRING, BASE_NONE, NULL, 0x0, |