Use Request.Scheme instead of Protocol (#7911)

This commit is contained in:
shnja 2019-03-05 17:39:37 -05:00 committed by Pranav K
parent 4e271ac124
commit 4c3996f824
2 changed files with 8 additions and 8 deletions

View File

@ -572,7 +572,7 @@ namespace Microsoft.AspNetCore.Mvc
if (protocol == null)
{
protocol = httpContext.Request.Protocol;
protocol = httpContext.Request.Scheme;
}
if (host == null)
@ -624,7 +624,7 @@ namespace Microsoft.AspNetCore.Mvc
if (protocol == null)
{
protocol = httpContext.Request.Protocol;
protocol = httpContext.Request.Scheme;
}
if (host == null)

View File

@ -615,7 +615,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test.Routing
{
Request =
{
Protocol = expectedProtocol,
Scheme = expectedProtocol,
Host = new HostString(expectedHost),
}
};
@ -650,7 +650,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test.Routing
{
Request =
{
Protocol = "http://",
Scheme = "http://",
Host = new HostString(expectedHost),
}
};
@ -685,7 +685,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test.Routing
{
Request =
{
Protocol = expectedProtocol,
Scheme = expectedProtocol,
Host = new HostString("www.asp.net"),
}
};
@ -723,7 +723,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test.Routing
{
Request =
{
Protocol = expectedProtocol,
Scheme = expectedProtocol,
Host = new HostString(expectedHost),
}
},
@ -771,7 +771,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test.Routing
{
Request =
{
Protocol = "http://",
Scheme = "http://",
Host = new HostString(expectedHost),
}
},
@ -819,7 +819,7 @@ namespace Microsoft.AspNetCore.Mvc.Core.Test.Routing
{
Request =
{
Protocol = expectedProtocol,
Scheme = expectedProtocol,
Host = new HostString("www.asp.net"),
}
},