Commit bbdc015e authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Call on_frame_recv_callback for DATA even if stream has been closed

This makes the callback semantics consistent with the other
frames like HEADERS/PUSH_PROMISE.
parent e186e019
......@@ -3154,6 +3154,13 @@ int nghttp2_session_on_data_received(nghttp2_session *session,
int rv = 0;
nghttp2_stream *stream;
/* We call on_frame_recv_callback even if stream has been closed
already */
rv = nghttp2_session_call_on_frame_received(session, frame);
if(nghttp2_is_fatal(rv)) {
return rv;
}
stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
if(!stream) {
/* This should be treated as stream error, but it results in lots
......@@ -3161,10 +3168,6 @@ int nghttp2_session_on_data_received(nghttp2_session *session,
for now. */
return 0;
}
rv = nghttp2_session_call_on_frame_received(session, frame);
if(nghttp2_is_fatal(rv)) {
return rv;
}
if(!nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
if(frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
rv = nghttp2_session_call_on_request_recv(session, frame->hd.stream_id);
......
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