Repository navigation
Conversation
Motivation: An otherwise valid server response could end its stream in the initial headers before application-provided trailers were sent. Modification: Keep normal empty responses with nonempty application trailers open until the trailer block is written. Preserve existing termination for HEAD, bodyless status codes, and responses without trailers. Result: The server sends initial headers followed by trailing headers without requiring a DATA frame. Existing body handling and client behavior are unchanged. References: RFC 9113 Section 8.1; Apache Pekko HTTP Trailer API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A normal HTTP/2 server response can carry application-provided trailers even when it has no body data. The server previously ended an empty response in its initial headers and omitted the trailers.
Modification
Keep a successful empty response with actual application trailers open until the trailing header block is sent. Reuse the existing trailer rendering and stream completion. Preserve existing termination for HEAD, no-content statuses, or responses without trailers.
Result
A normal empty response sends initial headers followed by terminal trailing headers, with no DATA frame needed. Nonempty responses and the client request path retain their existing behavior.
Tests
git diff --checkpassed. Full CI was not verified before opening.References
TrailerAPI.