HTTP: Fix full_uri when using a Proxy

When the HTTP request is transmitted to a Proxy the URI is already
a "full URI".

Bug was reported by Thomas Baudelet.

Bug: 12176
Change-Id: I83f6bdef6fa96233792c6bbe54caad38df0f5fb6
Reviewed-on: https://code.wireshark.org/review/14142
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Uli Heilmeier 2016-02-25 15:00:18 +01:00 committed by Michael Mann
parent 7bd6bae799
commit 10358a2f14
1 changed files with 10 additions and 3 deletions

View File

@ -1082,9 +1082,16 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item *e_ti;
gchar *uri;
uri = wmem_strdup_printf(wmem_packet_scope(), "%s://%s%s",
is_ssl ? "https" : "http",
g_strstrip(wmem_strdup(wmem_packet_scope(), stat_info->http_host)), stat_info->request_uri);
if ((g_ascii_strncasecmp(stat_info->request_uri, "http://", 7) == 0) ||
(g_ascii_strncasecmp(stat_info->request_uri, "https://", 8) == 0) ||
(g_ascii_strncasecmp(conv_data->request_method, "CONNECT", 7) == 0)) {
uri = wmem_strdup(wmem_packet_scope(), stat_info->request_uri);
}
else {
uri = wmem_strdup_printf(wmem_packet_scope(), "%s://%s%s",
is_ssl ? "https" : "http",
g_strstrip(wmem_strdup(wmem_packet_scope(), stat_info->http_host)), stat_info->request_uri);
}
e_ti = proto_tree_add_string(http_tree,
hf_http_request_full_uri, tvb, 0,