Skip to content

Conversation

@mchang-stripe
Copy link

Description & motivation 💭

This PR adds support for forwarding binary gRPC headers (headers ending with -bin suffix) from HTTP requests to gRPC metadata.

Motivation:
Binary headers in gRPC are base64-encoded when transmitted over the wire, but must be stored as plain text in gRPC metadata. Previously, the header forwarding middleware would forward binary headers as-is (base64-encoded), which would cause double-encoding issues when the gRPC library re-encodes them for transmission.

Changes:

  • Modified WithForwardHeaders to detect binary headers (those ending with -bin)
  • Binary headers are now base64-decoded before being added to gRPC metadata
  • Regular headers continue to be forwarded as-is
  • Supports both standard base64 (with padding) and raw base64 (without padding)

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@mchang-stripe mchang-stripe requested a review from a team as a code owner October 31, 2025 21:45
@mchang-stripe mchang-stripe requested review from KATIETOLER and removed request for a team October 31, 2025 21:45
@vercel
Copy link

vercel bot commented Oct 31, 2025

@mchang-stripe is attempting to deploy a commit to the Temporal Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Oct 31, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants