From: Amaury Denoyelle Date: Mon, 29 Jan 2024 12:45:48 +0000 (+0100) Subject: BUG/MEDIUM: qpack: allow 6xx..9xx status codes X-Git-Tag: v3.0-dev3~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d22c4956c53895e5347d84d43f2a70cbdc01bef;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: qpack: allow 6xx..9xx status codes HTTP status codes outside of 100..599 are considered invalid in HTTP RFC9110. However, it is explicitely stated that range 600..999 is often used for internal communication so in practice haproxy must be lenient with it. Before this patch, QPACK encoder rejected these values. This resulted in a connection error. Fix this by extending the range of allowed values from 100 to 999. This is linked to github issue #2422. Once again, thanks to @yokim-git for his help here. This must be backported up to 2.6. --- diff --git a/src/qpack-enc.c b/src/qpack-enc.c index 59bb97fb66..006f1f1a97 100644 --- a/src/qpack-enc.c +++ b/src/qpack-enc.c @@ -69,7 +69,7 @@ int qpack_encode_int_status(struct buffer *out, unsigned int status) { int status_size, idx = 0; - if (status < 100 || status > 599) + if (status < 100 || status > 999) return 1; switch (status) {