Commit d00788ce authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp: More robust error handling while reading file

parent e0df95a1
...@@ -2355,7 +2355,7 @@ ssize_t file_read_callback(nghttp2_session *session, int32_t stream_id, ...@@ -2355,7 +2355,7 @@ ssize_t file_read_callback(nghttp2_session *session, int32_t stream_id,
return nread; return nread;
} }
if (nread == 0) { if (req->data_offset > req->data_length || nread == 0) {
return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
} }
......
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