Commit dba0f35e authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Avoid 0-length DATA if NGHTTP2_DATA_FLAG_NO_END_STREAM is set

parent 2d2b72d4
......@@ -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;
}
......
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