Simplify error handling in nghttp2_session_on_headers_received
return session_inflate_handle_invalid_stream(...) case is for streams for INITIAL state, but this is rare case. In general, we'd like to reduce RST_STREAM transmission, and it is suffice to ignore this frame for now.
This commit is contained in:
parent
6c1a76af6e
commit
010726a875
|
@ -3593,15 +3593,9 @@ int nghttp2_session_on_headers_received(nghttp2_session *session,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else if (stream->state == NGHTTP2_STREAM_CLOSING) {
|
|
||||||
/* This is race condition. NGHTTP2_STREAM_CLOSING indicates
|
|
||||||
that we queued RST_STREAM but it has not been sent. It will
|
|
||||||
eventually sent, so we just ignore this frame. */
|
|
||||||
return NGHTTP2_ERR_IGN_HEADER_BLOCK;
|
|
||||||
} else {
|
|
||||||
return session_inflate_handle_invalid_stream(session, frame,
|
|
||||||
NGHTTP2_ERR_PROTO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NGHTTP2_ERR_IGN_HEADER_BLOCK;
|
||||||
}
|
}
|
||||||
/* If this is remote peer initiated stream, it is OK unless it
|
/* If this is remote peer initiated stream, it is OK unless it
|
||||||
has sent END_STREAM frame already. But if stream is in
|
has sent END_STREAM frame already. But if stream is in
|
||||||
|
|
Loading…
Reference in New Issue