Skip to content

Fix the bug that stream is closed with wrong error code#1409

Merged
tatsuhiro-t merged 1 commit intomasterfrom
fix-wrong-stream-close-error-code
Oct 29, 2019
Merged

Fix the bug that stream is closed with wrong error code#1409
tatsuhiro-t merged 1 commit intomasterfrom
fix-wrong-stream-close-error-code

Conversation

@tatsuhiro-t
Copy link
Copy Markdown
Member

This commit fixes the bug that stream is closed with wrong error code
(0). This happens when STREAM or DATA frame with END_STREAM flag set
is received and it violates HTTP messaging rule (i.e., content-length
does not match). In this case, nghttp2_on_stream_close_callback
should be called with nonzero error code, but previously it is called
with 0 (NO_ERROR).

Fixes #1408

This commit fixes the bug that stream is closed with wrong error code
(0).  This happens when STREAM or DATA frame with END_STREAM flag set
is received and it violates HTTP messaging rule (i.e., content-length
does not match) and the other side of stream has been closed.  In this
case, nghttp2_on_stream_close_callback should be called with nonzero
error code, but previously it is called with 0 (NO_ERROR).
@tatsuhiro-t tatsuhiro-t force-pushed the fix-wrong-stream-close-error-code branch from c342b4e to 6ce4835 Compare October 29, 2019 12:06
@tatsuhiro-t tatsuhiro-t merged commit db9a8f6 into master Oct 29, 2019
@tatsuhiro-t tatsuhiro-t deleted the fix-wrong-stream-close-error-code branch October 29, 2019 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Responses with invalid 'content-length' header

1 participant