aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http.c
diff options
context:
space:
mode:
authorSake Blok <sake@euronet.nl>2012-08-19 23:52:37 +0000
committerSake Blok <sake@euronet.nl>2012-08-19 23:52:37 +0000
commit66115d1200e1041c1f805ee6cff7dec2bc24eadf (patch)
treee0ccf3ab6c6ef5ebe167cc5cefb4676ac5a2c70d /epan/dissectors/packet-http.c
parent44cb77d8de8b08d2d77967e1a097153d86e93ba1 (diff)
Enhance the http dissector to correctly reassemble http
headers when the first tcp segment does not contain a full line. svn path=/trunk/; revision=44593
Diffstat (limited to 'epan/dissectors/packet-http.c')
-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?
*/