Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*nghttp2_on_data_chunk_recv_callback return code not handled as documented #1465

Open
ralphdolmans opened this issue May 1, 2020 · 0 comments

Comments

@ralphdolmans
Copy link

Hi. First of all, thanks for this work!

While working with this code is noticed some unexpected behavior, which is caused by a difference between documentation and code. Not sure which of the two are wrong.

According to https://nghttp2.org/documentation/types.html#c.nghttp2_on_data_chunk_recv_callback

The implementation of this function must return 0 if it succeeds. If nonzero is returned, it is treated as fatal error, and nghttp2_session_recv() and nghttp2_session_mem_recv() functions immediately return NGHTTP2_ERR_CALLBACK_FAILURE.

In reality, this is not the case for all nonzero values, only return values below NGHTTP2_ERR_FATAL (-900) are treated as fatal:

if (nghttp2_is_fatal(rv)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant