Add test for WINDOW_UPDATE against reserved
This commit is contained in:
parent
618a1e0782
commit
da384988cd
|
@ -1177,6 +1177,20 @@ void test_nghttp2_session_on_window_update_received(void)
|
||||||
|
|
||||||
nghttp2_frame_window_update_free(&frame.window_update);
|
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);
|
nghttp2_session_del(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue