]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: filters/htx: Use channel_htx_fwd_headers() after headers filtering
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 May 2019 08:31:07 +0000 (10:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 05:42:33 +0000 (07:42 +0200)
Instead of doing it by hand in the function flt_analyze_http_headers(), we now
call the dedicated function to do so.

src/filters.c

index 62e256ee96f1cad560e27ecfce9ad9d67fbd7097..354aa6a3a020f44e5312b459efc1bcf526015c6f 100644 (file)
@@ -929,17 +929,8 @@ flt_analyze_http_headers(struct stream *s, struct channel *chn, unsigned int an_
                }
        } RESUME_FILTER_END;
 
-       if (IS_HTX_STRM(s)) {
-               struct htx *htx = htxbuf(&chn->buf);
-               int32_t pos;
-
-               for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
-                       struct htx_blk *blk = htx_get_blk(htx, pos);
-                       c_adv(chn, htx_get_blksz(blk));
-                       if (htx_get_blk_type(blk) == HTX_BLK_EOH)
-                               break;
-               }
-       }
+       if (IS_HTX_STRM(s))
+               channel_htx_fwd_headers(chn, htxbuf(&chn->buf));
        else {
                /* We increase next offset of all "data" filters after all processing on
                 * headers because any filter can alter them. So the definitive size of