aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-01-28 17:04:48 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-01-28 17:04:48 +0000
commit20881c49bb607b6ab053f18f2748fcac7ac6d24b (patch)
tree9b3208ea7c697f548502c6cf04f54e75994431d5 /epan/dissectors/packet-http.c
parent855289862a5c9283313a4dd30e12c5e2f8bef45f (diff)
From Claudio:
linear white space (LWS) not ignored after HTTP header field content. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6591 svn path=/trunk/; revision=40753
Diffstat (limited to 'epan/dissectors/packet-http.c')
-rw-r--r--epan/dissectors/packet-http.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 5ac17ea857..8bd466bb0f 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -896,13 +896,16 @@ 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;
- size_t size = strlen("http://") + strlen(stat_info->http_host)
+ gchar* hostname = g_strstrip(g_strdup(stat_info->http_host));
+ size_t size = strlen("http://") + strlen(hostname)
+ strlen(stat_info->request_uri) + 1;
char *uri = ep_alloc(size);
g_snprintf(uri, (gulong)size, "%s://%s%s",
"http", /* XXX, https? */
- stat_info->http_host, stat_info->request_uri);
+ hostname, stat_info->request_uri);
+
+ g_free(hostname);
e_ti = proto_tree_add_string(http_tree,
hf_http_request_full_uri, tvb, 0,