-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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 abstractionshelp 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
Akin to dotnet/runtime#78204
Some uses have already been replaced in #45300, but there are more cases where using IndexOfAnyValues can speed things up or simplify the implementation. From a few grep searches:
-
PathString.ToUriComponentcan be rewritten along the lines ofUriHelper.EscapeString -
public string ToUriComponent() -
Targets old TFMsprivate static bool HasInvalidPathChars(string path) => path.IndexOfAny(_invalidFileNameChars) != -1; -
internal static int GetTokenLength(string input, int startIndex) - (which looks like a copy of the one in Runtime, so could just copy Use IndexOfAnyValues in System.Net.Http runtime#78660)
internal static int GetTokenLength(StringSegment input, int startIndex) - All the checks in https://github.com/dotnet/aspnetcore/blob/main/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs
- (also already done in runtime in Use IndexOfAnyValues in System.Net.Http runtime#78660)
private static string Encode5987(StringSegment input) -
private static bool IsCookieValueChar(char c) -
private static class Html401IdUtil -
private static readonly char[] ValidAttributeWhitespaceChars =
PaulusParssinen and davidfowl
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 abstractionshelp 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