Use error code CANCEL to reset pushed reserved stream from remote
This commit is contained in:
parent
c3459c9e86
commit
7463493259
|
@ -4196,9 +4196,8 @@ int nghttp2_session_on_push_promise_received(nghttp2_session *session,
|
|||
session, frame, NGHTTP2_ERR_PROTO, "PUSH_PROMISE: stream in idle");
|
||||
}
|
||||
}
|
||||
rv = nghttp2_session_add_rst_stream(session,
|
||||
frame->push_promise.promised_stream_id,
|
||||
NGHTTP2_REFUSED_STREAM);
|
||||
rv = nghttp2_session_add_rst_stream(
|
||||
session, frame->push_promise.promised_stream_id, NGHTTP2_CANCEL);
|
||||
if (rv != 0) {
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -2632,7 +2632,7 @@ void test_nghttp2_session_on_push_promise_received(void) {
|
|||
item = nghttp2_session_get_next_ob_item(session);
|
||||
CU_ASSERT(NGHTTP2_RST_STREAM == item->frame.hd.type);
|
||||
CU_ASSERT(6 == item->frame.hd.stream_id);
|
||||
CU_ASSERT(NGHTTP2_REFUSED_STREAM == item->frame.rst_stream.error_code);
|
||||
CU_ASSERT(NGHTTP2_CANCEL == item->frame.rst_stream.error_code);
|
||||
CU_ASSERT(0 == nghttp2_session_send(session));
|
||||
|
||||
/* Attempt to PUSH_PROMISE against non-existent stream */
|
||||
|
@ -2806,7 +2806,7 @@ void test_nghttp2_session_on_push_promise_received(void) {
|
|||
item = nghttp2_session_get_next_ob_item(session);
|
||||
|
||||
CU_ASSERT(NGHTTP2_RST_STREAM == item->frame.hd.type);
|
||||
CU_ASSERT(NGHTTP2_REFUSED_STREAM == item->frame.rst_stream.error_code);
|
||||
CU_ASSERT(NGHTTP2_CANCEL == item->frame.rst_stream.error_code);
|
||||
|
||||
nghttp2_frame_push_promise_free(&frame.push_promise, mem);
|
||||
nghttp2_session_del(session);
|
||||
|
|
Loading…
Reference in New Issue