]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: htx: fix typo in htx_replace_stline() making it fail all the time
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Dec 2018 16:12:22 +0000 (17:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Dec 2018 16:12:22 +0000 (17:12 +0100)
A typo in the block type check makes this function fail all the time,
which has impact on anything rewriting a start line (set-uri, set-path
etc).

No backport needed.

src/htx.c

index 2c660e79b1961ec650be36d2909a15499ced2df5..cd16bf3a1b161d4c75f366ddc5b480bd93c28187 100644 (file)
--- a/src/htx.c
+++ b/src/htx.c
@@ -602,7 +602,7 @@ struct htx_sl *htx_replace_stline(struct htx *htx, struct htx_blk *blk, const st
        uint32_t size;
 
        type = htx_get_blk_type(blk);
-       if (type != HTX_BLK_REQ_SL || HTX_BLK_RES_SL)
+       if (type != HTX_BLK_REQ_SL && type != HTX_BLK_RES_SL)
                return NULL;
 
        /* Save start-line info and flags */