Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 7f2aaac

Browse files
author
Cesar Blum Silveira
committed
Assign normalized target to new variable.
1 parent 1bf2f6b commit 7f2aaac

File tree

1 file changed

+6
-6
lines changed
  • src/Microsoft.AspNetCore.Server.Kestrel/Http

1 file changed

+6
-6
lines changed

src/Microsoft.AspNetCore.Server.Kestrel/Http/Frame.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ protected RequestLineStatus TakeStartLine(SocketInput input)
927927
}
928928
}
929929

930-
requestUrlPath = PathNormalizer.RemoveDotSegments(requestUrlPath);
930+
var normalizedTarget = PathNormalizer.RemoveDotSegments(requestUrlPath);
931931

932932
consumed = scan;
933933
Method = method;
@@ -936,14 +936,14 @@ protected RequestLineStatus TakeStartLine(SocketInput input)
936936
HttpVersion = httpVersion;
937937

938938
bool caseMatches;
939-
if (RequestUrlStartsWithPathBase(requestUrlPath, out caseMatches))
939+
if (RequestUrlStartsWithPathBase(normalizedTarget, out caseMatches))
940940
{
941-
PathBase = caseMatches ? _pathBase : requestUrlPath.Substring(0, _pathBase.Length);
942-
Path = requestUrlPath.Substring(_pathBase.Length);
941+
PathBase = caseMatches ? _pathBase : normalizedTarget.Substring(0, _pathBase.Length);
942+
Path = normalizedTarget.Substring(_pathBase.Length);
943943
}
944-
else if (rawTarget[0] == '/') // check rawTarget since requestUrlPath can be "" or "/" after dot segment removal
944+
else if (rawTarget[0] == '/') // check rawTarget since normalizedTarget can be "" or "/" after dot segment removal
945945
{
946-
Path = requestUrlPath;
946+
Path = normalizedTarget;
947947
}
948948
else
949949
{

0 commit comments

Comments
 (0)