Skip to content

fix: preserve all headers from response metadata#51

Open
lkimtra wants to merge 1 commit intoblockscout:mainfrom
lkimtra:lkimtra/preserve-duplicate-response-headers
Open

fix: preserve all headers from response metadata#51
lkimtra wants to merge 1 commit intoblockscout:mainfrom
lkimtra:lkimtra/preserve-duplicate-response-headers

Conversation

@lkimtra
Copy link

@lkimtra lkimtra commented Feb 2, 2026

Problem

When forwarding headers from gRPC response metadata to HTTP response,
insert_header was being used which overwrites any existing header
with the same name. This causes data loss when the metadata contains
multiple headers with the same key.

Solution

Changed from insert_header to append_header to preserve all headers
from gRPC metadata exactly as they are, without overwriting duplicates.

Example

Headers like Set-Cookie, Link, Warning, or any custom headers that
may appear multiple times are now correctly forwarded to the HTTP response.

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.

1 participant