Check content-length before calling stream_close_callback with error code 0
This commit is contained in:
parent
2f4fe25ec0
commit
cb0ebb38c6
|
@ -1196,6 +1196,11 @@ int nghttp2_session_close_stream(nghttp2_session *session, int32_t stream_id,
|
|||
}
|
||||
}
|
||||
|
||||
if (error_code == NGHTTP2_NO_ERROR &&
|
||||
nghttp2_http_on_remote_end_stream(stream) == -1) {
|
||||
error_code = NGHTTP2_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
/* We call on_stream_close_callback even if stream->state is
|
||||
NGHTTP2_STREAM_INITIAL. This will happen while sending request
|
||||
HEADERS, a local endpoint receives RST_STREAM for that stream. It
|
||||
|
|
Loading…
Reference in New Issue