summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-http.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-12-24 13:53:09 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-12-24 13:53:09 +0000
commitd6b1e2e95cc82352a7bbda45f865d97a93de49ad (patch)
tree2fe9ccc190858a44dbb56cc0e6987b79d0119cec /epan/dissectors/packet-http.c
parentfba61a31becc8be0789fbb5376c1fe909b9cfa4f (diff)
downloadwireshark-d6b1e2e95cc82352a7bbda45f865d97a93de49ad.tar.gz
use https instead of http in the url when the packet contains ssl
svn path=/trunk/; revision=54440
Diffstat (limited to 'epan/dissectors/packet-http.c')
-rw-r--r--epan/dissectors/packet-http.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 58cdd50fc6..f24d810278 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -1010,8 +1010,12 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (tree && stat_info->http_host && stat_info->request_uri) {
proto_item *e_ti;
- gchar *uri = wmem_strdup_printf(wmem_packet_scope(), "%s://%s%s",
- "http", /* XXX, https? */
+ gboolean is_ssl = FALSE;
+ gchar *uri;
+
+ proto_get_frame_protocols(pinfo->layers, NULL, NULL, NULL, NULL, &is_ssl);
+ 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,