diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c index 9fd6748a..cfcc7fcf 100644 --- a/tests/nghttp2_session_test.c +++ b/tests/nghttp2_session_test.c @@ -1177,6 +1177,20 @@ void test_nghttp2_session_on_window_update_received(void) nghttp2_frame_window_update_free(&frame.window_update); + /* WINDOW_UPDATE against reserved stream is a connection error */ + stream = nghttp2_session_open_stream(session, 2, NGHTTP2_FLAG_NONE, + NGHTTP2_PRI_DEFAULT, + NGHTTP2_STREAM_RESERVED, NULL); + + nghttp2_frame_window_update_init(&frame.window_update, NGHTTP2_FLAG_NONE, + 2, 4096); + + CU_ASSERT(!(session->goaway_flags & NGHTTP2_GOAWAY_FAIL_ON_SEND)); + CU_ASSERT(0 == nghttp2_session_on_window_update_received(session, &frame)); + CU_ASSERT(session->goaway_flags & NGHTTP2_GOAWAY_FAIL_ON_SEND); + + nghttp2_frame_window_update_free(&frame.window_update); + nghttp2_session_del(session); }