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 marked this pull request as ready for review
Laszlo Deak added 2 commits
…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.