aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsake <sake@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-19 23:52:37 +0000
committersake <sake@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-19 23:52:37 +0000
commit3ae154565e02c2d9f90d16ebff3c08b306b04ccf (patch)
treee0ccf3ab6c6ef5ebe167cc5cefb4676ac5a2c70d
parent2c2056f5b2e2917a3c9382b98dd87bab2bf8dc79 (diff)
Enhance the http dissector to correctly reassemble http
headers when the first tcp segment does not contain a full line. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44593 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-http.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index fec6736c44..d2dfdd83dc 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -645,7 +645,21 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
*/
first_linelen = tvb_find_line_end(tvb, offset,
tvb_ensure_length_remaining(tvb, offset), &next_offset,
- FALSE);
+ TRUE);
+
+ if (first_linelen == -1) {
+ /* No complete line was found in this segment, do
+ * desegmentation if we're told to.
+ */
+ if (!req_resp_hdrs_do_reassembly(tvb, offset, pinfo,
+ http_desegment_headers, http_desegment_body)) {
+ /*
+ * More data needed for desegmentation.
+ */
+ return -1;
+ }
+ }
+
/*
* Is the first line a request or response?
*/