diff --git a/src/mux_h1.c b/src/mux_h1.c index 7cc7ba6eb..ee12686bb 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1270,6 +1270,10 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun n = htx_get_blk_name(chn_htx, blk); v = htx_get_blk_value(chn_htx, blk); + /* Skip all pseudo-headers */ + if (*(n.ptr) == ':') + goto skip_hdr; + if (isteqi(n, ist("transfer-encoding"))) h1_parse_xfer_enc_header(h1m, v); else if (isteqi(n, ist("content-length"))) { diff --git a/src/mux_h2.c b/src/mux_h2.c index 33ba9bbfe..fababa190 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -4525,6 +4525,10 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, struct htx *htx) isteq(list[hdr].n, ist("transfer-encoding"))) continue; + /* Skip all pseudo-headers */ + if (*(list[hdr].n.ptr) == ':') + continue; + if (isteq(list[hdr].n, ist(""))) break; // end @@ -4793,6 +4797,10 @@ static size_t h2s_bck_make_req_headers(struct h2s *h2s, struct htx *htx) isteq(list[hdr].n, ist("transfer-encoding"))) continue; + /* Skip all pseudo-headers */ + if (*(list[hdr].n.ptr) == ':') + continue; + if (isteq(list[hdr].n, ist(""))) break; // end @@ -5263,6 +5271,10 @@ static size_t h2s_make_trailers(struct h2s *h2s, struct htx *htx) isteq(list[idx].n, ist("transfer-encoding"))) continue; + /* Skip all pseudo-headers */ + if (*(list[idx].n.ptr) == ':') + continue; + if (!hpack_encode_header(&outbuf, list[idx].n, list[idx].v)) { /* output full */ if (b_space_wraps(mbuf))