From a9bd19853e9039257c7c15cc855646ea8bae8ca8 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 3 Apr 2007 20:03:18 +0200 Subject: [PATCH] [BUG] initialize msg->sol before parsing first line Before calling http_parse_{sts,req}line(), it is necessary to make msg->sol point to the beginning of the line. This was not done, resulting in the proxy sometimes crashing when URI rewriting or result rewriting was used. --- src/proto_http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proto_http.c b/src/proto_http.c index 236e77464..38b2db02c 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3998,6 +3998,7 @@ int apply_filter_to_req_line(struct session *t, struct buffer *req, struct hdr_e txn->req.eoh += delta; cur_end += delta; + txn->req.sol = req->data + txn->req.som; cur_end = (char *)http_parse_reqline(&txn->req, req->data, HTTP_MSG_RQMETH, cur_ptr, cur_end + 1, @@ -4563,6 +4564,7 @@ int apply_filter_to_sts_line(struct session *t, struct buffer *rtr, struct hdr_e txn->rsp.eoh += delta; cur_end += delta; + txn->rsp.sol = rtr->data + txn->rsp.som; cur_end = (char *)http_parse_stsline(&txn->rsp, rtr->data, HTTP_MSG_RPVER, cur_ptr, cur_end + 1,