]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] debug: wrong pointer was used to report a status line
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Jun 2010 11:57:32 +0000 (13:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Jun 2010 20:43:55 +0000 (22:43 +0200)
This would only be wrong when the server has not completely responded yet.
Fix two other occurrences of wrong rsp<->sl associations which were harmless
but wrong anyway.

src/proto_http.c

index 1362cf3131a5d7d6c668a5038c2bd5e084e2e762..ad95e569b9823e12f2454646c0f70e816661c349 100644 (file)
@@ -4338,7 +4338,7 @@ int http_wait_for_response(struct session *s, struct buffer *rep, int an_bit)
                char *eol, *sol;
 
                sol = msg->sol;
-               eol = sol + msg->sl.rq.l;
+               eol = sol + msg->sl.st.l;
                debug_hdr("srvrep", s, sol, eol);
 
                sol += hdr_idx_first_pos(&txn->hdr_idx);
@@ -5982,7 +5982,7 @@ int apply_filter_to_sts_line(struct session *t, struct buffer *rtr, struct hdr_e
        done = 0;
 
        cur_ptr = txn->rsp.sol;
-       cur_end = cur_ptr + txn->rsp.sl.rq.l;
+       cur_end = cur_ptr + txn->rsp.sl.st.l;
 
        /* Now we have the status line between cur_ptr and cur_end */
 
@@ -6028,7 +6028,7 @@ int apply_filter_to_sts_line(struct session *t, struct buffer *rtr, struct hdr_e
                         * or an LF at <ptr>.
                         */
                        txn->status = strl2ui(txn->rsp.sol + txn->rsp.sl.st.c, txn->rsp.sl.st.c_l);
-                       hdr_idx_set_start(&txn->hdr_idx, txn->rsp.sl.rq.l, *cur_end == '\r');
+                       hdr_idx_set_start(&txn->hdr_idx, txn->rsp.sl.st.l, *cur_end == '\r');
                        /* there is no point trying this regex on headers */
                        return 1;
                }