Skip to content

Commit

Permalink
Add StringComparison.OrdinalIgnoreCase
Browse files Browse the repository at this point in the history
  • Loading branch information
mderriey committed Mar 11, 2024
1 parent 996407c commit 7fa2f2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public OpenApiUrlTreeNode Attach(string path,
}

var segments = path.Split('/');
if (path.EndsWith("/"))
if (path.EndsWith("/", StringComparison.OrdinalIgnoreCase))
{
// Remove the last element, which is empty, and append the trailing slash to the new last element
// This is to support URLs with trailing slashes
Expand Down

0 comments on commit 7fa2f2c

Please sign in to comment.