Skip to content

server: add case-preserving header map#2177

Merged
svix-jbrown merged 2 commits intomainfrom
jbrown/case-insensitive
Feb 10, 2026
Merged

server: add case-preserving header map#2177
svix-jbrown merged 2 commits intomainfrom
jbrown/case-insensitive

Conversation

@svix-jbrown
Copy link
Contributor

Currently, the OSS version of the server uses a simple HashMap<String, String> for headers. This results in confusing behavior if the same header is inserted twice with different casings (for example, if a custom override header sets User-Agent, and our code inserts user-agent).

This PR modifies the server to use a case preserving map for headers, which will still correctly remember the difference between user-agent and User-Agent, but will not allow duplicates.

This is mostly migrated from svix/svix-webhooks-private#5916 in the private fork, with modifications to work with the OSS layout.

Part of svix/monorepo-private#12554

@svix-jbrown svix-jbrown force-pushed the jbrown/case-insensitive branch from eb332ee to 32a4af2 Compare February 9, 2026 21:14
@svix-jbrown svix-jbrown marked this pull request as ready for review February 10, 2026 00:15
@svix-jbrown svix-jbrown requested a review from a team as a code owner February 10, 2026 00:15
svix-jplatte
svix-jplatte previously approved these changes Feb 10, 2026
@svix-jbrown svix-jbrown merged commit a2096c3 into main Feb 10, 2026
16 checks passed
@svix-jbrown svix-jbrown deleted the jbrown/case-insensitive branch February 10, 2026 18:05
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