Commit da384988 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Add test for WINDOW_UPDATE against reserved

parent 618a1e07
...@@ -1177,6 +1177,20 @@ void test_nghttp2_session_on_window_update_received(void) ...@@ -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);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment