aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-06-20 16:51:43 -0400
committerAnders Broman <a.broman58@gmail.com>2017-06-21 14:50:22 +0000
commitd60d2c8ca2a525aa2cb0ee132449779b0ecbd9ce (patch)
tree268727086c7abdf90f605242649fb719c33ccb8d /epan
parent855484fbd98c8c01f5a84902243389e07e32b6e9 (diff)
http: fix handling of HTTP responses followed by proxy responses
Reused TCP connections with multiple HTTP requests/responses (in particular: HTTP request/response and HTTP proxy request/response) exhibit the following problem: the first response sets "startframe" such that the proxy response accidentally assumes that the proxy response starts in that first response. Fix this by only setting startframe if there is actually a transport upgrade. Tested with original capture and the Websocket dissection still works while Christian's capture has no longer the reported problem. Change-Id: I8a7878b9a2a98878a9e5be4f680d4f109fd8ab55 Fixes: 94ae27661e80 ("WebSocket dissector improvements") Reported-by: Christian Landström Reviewed-on: https://code.wireshark.org/review/22294 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index f0dabecd1b..a77bfe6b27 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -1645,7 +1645,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
headers.upgrade = conv_data->upgrade;
}
- if (http_type == HTTP_RESPONSE && pinfo->desegment_offset<=0 && pinfo->desegment_len<=0) {
+ if (http_type == HTTP_RESPONSE && headers.upgrade && pinfo->desegment_offset<=0 && pinfo->desegment_len<=0) {
conv_data->upgrade = headers.upgrade;
conv_data->startframe = pinfo->num + 1;
copy_address_wmem(wmem_file_scope(), &conv_data->server_addr, &pinfo->src);