From: Christopher Faulet Date: Thu, 23 May 2019 08:31:07 +0000 (+0200) Subject: MINOR: filters/htx: Use channel_htx_fwd_headers() after headers filtering X-Git-Tag: v2.0-dev5~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17fd8a261f5d8c735790fc69336481fc62ca144e;p=thirdparty%2Fhaproxy.git MINOR: filters/htx: Use channel_htx_fwd_headers() after headers filtering Instead of doing it by hand in the function flt_analyze_http_headers(), we now call the dedicated function to do so. --- diff --git a/src/filters.c b/src/filters.c index 62e256ee96..354aa6a3a0 100644 --- a/src/filters.c +++ b/src/filters.c @@ -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