-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
Perfarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsgood first issueGood for newcomers.Good for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issueUp for grabs. We would accept a PR to help resolve this issue
Milestone
Description
This HandshakeHelpers class is a relic of an outdated design. Can you try simplifying this code by merging this method into the UpgradeHandshake class?
You could remove these allocations and query the header collection directly:
aspnetcore/src/Middleware/WebSockets/src/WebSocketMiddleware.cs
Lines 121 to 128 in c925f99
var headers = new List<KeyValuePair<string, string>>(); foreach (string headerName in HandshakeHelpers.NeededHeaders) { foreach (var value in _context.Request.Headers.GetCommaSeparatedValues(headerName)) { headers.Add(new KeyValuePair<string, string>(headerName, value)); } } NeededHeaders can also be removed.
Metadata
Metadata
Assignees
Labels
Perfarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsgood first issueGood for newcomers.Good for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issueUp for grabs. We would accept a PR to help resolve this issue