Azure / Azure/azure-functions-host

HttpRequestData should preserve the capitalization of custom http header keys

Open
#7,654 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Hi all!

I have a function running .NET 5 in an isolated process. When the HTTP trigger is hit with a request containing some custom http header key (ie. My-SPECIAL-CaSe-sensitive-Header), the capitalization seems to be lost when accessing the header via `HttpRequestData`. The `BindingContext`, however, holds the custom header key with the original capitalization. `HttpRequestData `should also preserve the original capitalization of custom http headers keys.

![image](https://user-images.githubusercontent.com/20907834/130434827-3d2fa0e7-d24f-4fbf-b58b-bc3f980b40ba.png)

![image](https://user-images.githubusercontent.com/20907834/130434850-194d1e9b-e12a-4562-8e6c-bc092b5720c8.png)

Thank you!
David

Contributor guide

Open the contributing guide

Research direction

Start by locating the HttpRequestData and BindingContext handling for HTTP trigger headers, then reproduce the issue with a custom header such as My-SPECIAL-CaSe-sensitive-Header. Compare the capitalization exposed by both objects; done means HttpRequestData preserves the original capitalization of custom header keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.