diff --git a/src/h3.c b/src/h3.c index 680589a65..d03c963c5 100644 --- a/src/h3.c +++ b/src/h3.c @@ -861,12 +861,20 @@ static ssize_t h3_headers_to_htx(struct qcs *qcs, const struct buffer *buf, } if (isteq(list[hdr_idx].n, ist("host"))) { + struct ist prev_auth = authority; + if (h3_set_authority(qcs, &authority, list[hdr_idx].v)) { h3s->err = H3_ERR_MESSAGE_ERROR; qcc_report_glitch(h3c->qcc, 1); len = -1; goto out; } + + if (isttest(prev_auth)) { + /* skip duplicate Host header */ + ++hdr_idx; + continue; + } } else if (isteq(list[hdr_idx].n, ist("cookie"))) { http_cookie_register(list, hdr_idx, &cookie, &last_cookie);