]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h2: handle CONTINUATION frames
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 06:19:21 +0000 (08:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:18 +0000 (18:16 +0100)
For now we have nowhere to store partial header frames so we can't
handle CONTINUATION frames and we must reject them. In this case we
respond with a stream error of type INTERNAL_ERROR.

src/mux_h2.c

index 72a4b507e8f67d047c97eae587ebe723f80cc389..7d828b14079c16ab2777cc4f6d42d99addbeb28a 100644 (file)
@@ -1204,6 +1204,15 @@ static void h2_process_demux(struct h2c *h2c)
                                ret = h2c_handle_window_update(h2c, h2s);
                        break;
 
+               case H2_FT_CONTINUATION:
+                       /* we currently don't support CONTINUATION frames since
+                        * we have nowhere to store the partial HEADERS frame.
+                        * Let's abort the stream on an INTERNAL_ERROR here.
+                        */
+                       if (h2c->st0 == H2_CS_FRAME_P)
+                               h2s_error(h2s, H2_ERR_INTERNAL_ERROR);
+                       break;
+
                        /* FIXME: implement all supported frame types here */
                default:
                        /* drop frames that we ignore. They may be larger than