]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2: remove useless check for empty frame length in h2s_decode_headers()
authorWilly Tarreau <w@1wt.eu>
Mon, 24 Dec 2018 09:21:36 +0000 (10:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 24 Dec 2018 10:45:00 +0000 (11:45 +0100)
This test for an empty frame was already performed in the callers, there
is no need for checking it again.

src/mux_h2.c

index 16082799c016d470a1e13dbd185524f3fc4c07f0..dae53c6c52e6bf1eb0cdf12c05a10ce0437f5f44 100644 (file)
@@ -3143,12 +3143,6 @@ static int h2s_decode_headers(struct h2s *h2s)
        int wrap;
        int try = 0;
 
-       if (!h2c->dfl) {
-               /* RFC7540#4.2 */
-               h2c_error(h2c, H2_ERR_FRAME_SIZE_ERROR); // empty headers frame!
-               goto fail;
-       }
-
        if (b_data(&h2c->dbuf) < h2c->dfl && !b_full(&h2c->dbuf))
                return 0; // incomplete input frame