]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h2: properly reject PUSH_PROMISE frames coming from the client
authorWilly Tarreau <w@1wt.eu>
Mon, 30 Oct 2017 12:52:01 +0000 (13:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:19 +0000 (18:16 +0100)
These ones deserve a connection error as per 5.1.

src/mux_h2.c

index 22340d43fdbfe613fad3c14ce5c6baf032223645..bae6847eadc98f63523b470886ee2cfedffbb7fb 100644 (file)
@@ -1698,7 +1698,13 @@ static void h2_process_demux(struct h2c *h2c)
                                ret = h2c_handle_goaway(h2c);
                        break;
 
-                       /* FIXME: implement all supported frame types here */
+               case H2_FT_PUSH_PROMISE:
+                       /* not permitted here, RFC7540#5.1 */
+                       h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
+                       h2c->st0 = H2_SS_ERROR;
+                       break;
+
+                       /* implement all extra frame types here */
                default:
                        /* drop frames that we ignore. They may be larger than
                         * the buffer so we drain all of their contents until