HttpSys request headers Keys and Count both allocate by ladeak · Pull Request #45156 · dotnet/aspnetcore (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

ladeak

Tratcher

@ladeak ladeak marked this pull request as ready for review

November 19, 2022 21:54

ladeak

ladeak

ladeak

Tratcher

Laszlo Deak added 2 commits

November 29, 2022 20:38

…cation free, while Keys allocate the string for the header keys that are not known and a list for the result.

RequestHeader.Generated.cs has a new HeaderKeys returned as ReadOnlySpan for accessing the know keys - by avoiding allocation with enumerator or a static list. RequestHeader.Generated.tt is updated, but I don't see it being used to generate the RequestHeader.Generated.cs file. NativeRequestContext provides new implementation to access the header keys and count.

Tratcher