Skip to content

transport: return unexpected EOF for partial headers#9204

Open
buger wants to merge 1 commit into
grpc:masterfrom
buger:codex/fix-transport-partial-header-eof
Open

transport: return unexpected EOF for partial headers#9204
buger wants to merge 1 commit into
grpc:masterfrom
buger:codex/fix-transport-partial-header-eof

Conversation

@buger

@buger buger commented Jun 27, 2026

Copy link
Copy Markdown

Fixes #9200

Track cumulative bytes read while filling a gRPC message header. If EOF occurs after any partial progress, return io.ErrUnexpectedEOF even when the final read call itself returned zero bytes.

The regression test splits a partial header and EOF across separate recv buffer messages and verifies both the returned error and flow-control byte accounting.

RELEASE NOTES:

  • transport: Partial gRPC message headers followed by EOF now return io.ErrUnexpectedEOF.

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.20%. Comparing base (d74861e) to head (26d88f7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9204      +/-   ##
==========================================
- Coverage   83.21%   83.20%   -0.01%     
==========================================
  Files         420      420              
  Lines       34008    34010       +2     
==========================================
  Hits        28299    28299              
- Misses       4275     4277       +2     
  Partials     1434     1434              
Files with missing lines Coverage Δ
internal/transport/transport.go 92.34% <100.00%> (+1.10%) ⬆️

... and 23 files with indirect coverage changes

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

@buger buger marked this pull request as ready for review June 27, 2026 08:52
@mbissa mbissa self-requested a review June 30, 2026 03:45
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.

transport: return unexpected EOF for partial message headers

1 participant