Avoid 0-length DATA if NGHTTP2_DATA_FLAG_NO_END_STREAM is set
This commit is contained in:
parent
2d2b72d4eb
commit
dba0f35ee1
|
@ -6906,6 +6906,14 @@ int nghttp2_session_pack_data(nghttp2_session *session, nghttp2_bufs *bufs,
|
|||
|
||||
reschedule_stream(stream);
|
||||
|
||||
if (frame->hd.length == 0 && (data_flags & NGHTTP2_DATA_FLAG_EOF) &&
|
||||
(data_flags & NGHTTP2_DATA_FLAG_NO_END_STREAM)) {
|
||||
/* DATA payload length is 0, and DATA frame does not bear
|
||||
END_STREAM. In this case, there is no point to send 0 length
|
||||
DATA frame. */
|
||||
return NGHTTP2_ERR_CANCEL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue