[1.18] service-invocation: document hop-by-hop header stripping in v1.18#5172
Open
JoshVanL wants to merge 3 commits into
Open
[1.18] service-invocation: document hop-by-hop header stripping in v1.18#5172JoshVanL wants to merge 3 commits into
JoshVanL wants to merge 3 commits into
Conversation
Cover dapr/dapr#9759. Before v1.18, Dapr forwarded hop-by-hop HTTP headers (Connection, Keep-Alive, Proxy-Connection, Transfer-Encoding, Upgrade, HTTP2-Settings, TE, Trailer, Proxy-Authorization) verbatim when proxying service invocation, violating RFC 7230 6.1 and breaking HTTP/2-upgrade-aware clients against HTTPS upstream servers. From v1.18, those headers are stripped on both request and response paths across every service invocation flavor (local, remote, HTTPEndpoint, dapr-app-id header, direct URL). End-to-end headers (Accept, Authorization, Content-Type, custom X-* headers) are unaffected. Signed-off-by: joshvanl <me@joshvanl.dev>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds documentation to the Service Invocation overview clarifying that Dapr strips hop-by-hop HTTP headers when proxying service invocation requests/responses, aligning behavior with RFC requirements and improving compatibility with upgrade-aware clients.
Changes:
- Document hop-by-hop header stripping behavior for HTTP service invocation.
- Enumerate affected hop-by-hop headers and clarify end-to-end headers are preserved.
- Add a cross-reference intended to point readers to HTTPEndpoint documentation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### Hop-by-hop header stripping | ||
|
|
||
| When proxying HTTP service invocation, Dapr removes the standard hop-by-hop headers defined in [RFC 7230 Section 6.1](https://datatracker.ietf.org/doc/html/rfc7230#section-6.1) before forwarding the request to the upstream application or [HTTPEndpoint]({{% ref "httpendpoints-overview.md" %}}), and again before forwarding the upstream's response back to the caller. These headers are: `Connection`, `Keep-Alive`, `Proxy-Connection`, `Transfer-Encoding`, `Upgrade`, `HTTP2-Settings`, `TE`, `Trailer`, and `Proxy-Authorization`. |
Contributor
nelson-parente
left a comment
There was a problem hiding this comment.
Pre-review for @marcduiker handoff: LGTM. Clean +6 lines documenting hop-by-hop header stripping per RFC 7230 §6.1. Accurate list of stripped headers, correct note that end-to-end headers are unaffected. Correct use of Hugo {{% ref %}} shortcode. Safe to merge after CI.
marcduiker
approved these changes
May 20, 2026
…rvice-invocation/service-invocation-overview.md Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
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.
Cover dapr/dapr#9759. Before v1.18, Dapr forwarded hop-by-hop HTTP headers (Connection, Keep-Alive, Proxy-Connection, Transfer-Encoding, Upgrade, HTTP2-Settings, TE, Trailer, Proxy-Authorization) verbatim when proxying service invocation, violating RFC 7230 6.1 and breaking HTTP/2-upgrade-aware clients against HTTPS upstream servers.
From v1.18, those headers are stripped on both request and response paths across every service invocation flavor (local, remote, HTTPEndpoint, dapr-app-id header, direct URL). End-to-end headers (Accept, Authorization, Content-Type, custom X-* headers) are unaffected.