aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2018-12-23 19:21:36 +0000
committerGraham Bloice <graham.bloice@trihedral.com>2018-12-24 16:50:28 +0000
commit4fb2449b82a20e310c52f0fa965db950f77ab9f7 (patch)
treed4150263aa8c4753caec271ada663450208de8a9 /epan/dissectors
parent03eb0a4159bdfb1c484b985ec0a57374fc90be24 (diff)
http: Add request URI to response
Add the request URI to the response to allow filtering of responses by request URI in a single pass. Bug: 15344 Change-Id: I89bf675dccaed37f54a4d13956223cbdde601e7d Reviewed-on: https://code.wireshark.org/review/31184 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-http.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 27b2e602e8..834e580b8d 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -73,6 +73,7 @@ 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_for_uri = -1;
static int hf_http_response_phrase = -1;
static int hf_http_authorization = -1;
static int hf_http_proxy_authenticate = -1;
@@ -1454,6 +1455,19 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
PROTO_ITEM_SET_GENERATED(pi);
}
+ /*
+ * add the request URI to the response to allow filtering responses filtered by URI
+ */
+ if (conv_data && (conv_data->full_uri || conv_data->request_uri)) {
+ if (conv_data->full_uri) {
+ pi = proto_tree_add_string(http_tree, hf_http_response_for_uri, tvb, 0, 0, conv_data->full_uri);
+ }
+ else {
+ pi = proto_tree_add_string(http_tree, hf_http_response_for_uri, tvb, 0, 0, conv_data->request_uri);
+ }
+ PROTO_ITEM_SET_GENERATED(pi);
+ }
+
break;
case HTTP_REQUEST:
@@ -3745,6 +3759,10 @@ proto_register_http(void)
{ "Status Code Description", "http.response.code.desc",
FT_STRING, BASE_NONE, NULL, 0x0,
"HTTP Response Status Code Description", HFILL }},
+ { &hf_http_response_for_uri,
+ { "Request URI", "http.response_for.uri",
+ FT_STRING, STR_UNICODE, NULL, 0x0,
+ "HTTP Response For-URI", HFILL }},
{ &hf_http_response_phrase,
{ "Response Phrase", "http.response.phrase",
FT_STRING, BASE_NONE, NULL, 0x0,