Skip to content

Stop sending empty data frame when input stream ends but the request stream is not ending. #520

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

Merged
merged 3 commits into from
Jun 9, 2025

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Jun 6, 2025

Issue #, if available:

  • It's not against the spec to send out empty data frame, but if the data frame is empty and without the end of stream flag, it doesn't contain any useful information.
  • We have the code try to prevent sending them
  • However, when the input stream is ending, we fall into a situation that we still send the empty data frame.
  • I consider it as an unexpected behavior.
  • Also, some server doesn't support this empty data frame without end of stream, eg: httpbin.org will return GOAWAY with frame size error.
  • Node, http2 also ignores the empty data frame

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TingDaoK TingDaoK changed the title Stop sending empty data frame Stop sending empty data frame when input stream ends but the request stream is not ending. Jun 6, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.52%. Comparing base (fcc4932) to head (ebb8363).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
+ Coverage   79.50%   79.52%   +0.01%     
==========================================
  Files          27       27              
  Lines       11703    11703              
==========================================
+ Hits         9305     9307       +2     
+ Misses       2398     2396       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TingDaoK TingDaoK merged commit 10961a7 into main Jun 9, 2025
41 checks passed
@TingDaoK TingDaoK deleted the stop-sending branch June 9, 2025 16:12
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

Successfully merging this pull request may close these issues.

3 participants