mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 10:38:53 +08:00
Handle circular dependency
Handle the situation if a stream is told to depend on its descendant. This is what http://tools.ietf.org/html/draft-ietf-httpbis-http2-12#section-5.3.3 says.
This commit is contained in:
@@ -2586,13 +2586,14 @@ void test_nghttp2_session_reprioritize_stream(void)
|
||||
CU_ASSERT(99 == stream->weight);
|
||||
CU_ASSERT(dep_stream == stream->dep_prev);
|
||||
|
||||
/* Test circular dependency; must be ignored */
|
||||
/* Test circular dependency; stream 1 is first removed and becomes
|
||||
root. Then stream 3 depends on it. */
|
||||
nghttp2_priority_spec_init(&pri_spec, 1, 1, 0);
|
||||
|
||||
nghttp2_session_reprioritize_stream(session, dep_stream, &pri_spec);
|
||||
|
||||
CU_ASSERT(16 == dep_stream->weight);
|
||||
CU_ASSERT(NULL == dep_stream->dep_prev);
|
||||
CU_ASSERT(1 == dep_stream->weight);
|
||||
CU_ASSERT(stream == dep_stream->dep_prev);
|
||||
|
||||
nghttp2_session_del(session);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user