Skip to content

[1.18] service-invocation: document hop-by-hop header stripping in v1.18#5172

Open
JoshVanL wants to merge 3 commits into
dapr:v1.18from
JoshVanL:joshvanl/v1.18-svc-invoke-hop-by-hop
Open

[1.18] service-invocation: document hop-by-hop header stripping in v1.18#5172
JoshVanL wants to merge 3 commits into
dapr:v1.18from
JoshVanL:joshvanl/v1.18-svc-invoke-hop-by-hop

Conversation

@JoshVanL
Copy link
Copy Markdown
Contributor

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.

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>
Copilot AI review requested due to automatic review settings May 19, 2026 15:05
@JoshVanL JoshVanL requested review from a team as code owners May 19, 2026 15:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
Copy link
Copy Markdown
Contributor

@nelson-parente nelson-parente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

…rvice-invocation/service-invocation-overview.md

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
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.

4 participants