]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: lua: clean output buffer
authorThierry FOURNIER <tfournier@arpalert.org>
Wed, 4 Nov 2015 09:52:59 +0000 (10:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 Nov 2015 00:15:34 +0000 (01:15 +0100)
When the txn.done() fiunction is called, the ouput buffer is cleaned,
but the associated relative pointer on the HTTP requests elements
is not reseted.

This patch remove this cleanup, because the output buffer may contain
data to forward.

src/hlua.c

index 8fc85a650d878ff0e6e048c714a51f1d0194949a..5ee233727ec0d18cff1d05ef2d0b8c37b002f4c1 100644 (file)
@@ -4819,10 +4819,6 @@ __LJMP static int hlua_txn_done(lua_State *L)
                htxn->s->txn->req.msg_state = HTTP_MSG_CLOSED;
                htxn->s->txn->rsp.msg_state = HTTP_MSG_DONE;
 
-               /* Trim any possible response */
-               oc->buf->i = 0;
-               htxn->s->txn->rsp.next = htxn->s->txn->rsp.sov = 0;
-
                /* Note that if we want to support keep-alive, we need
                 * to bypass the close/shutr_now calls below, but that
                 * may only be done if the HTTP request was already