This commit is contained in:
BrennanConroy 2016-06-07 11:35:40 -07:00
parent 7808a47ccc
commit e41b455141
2 changed files with 3 additions and 19 deletions

View File

@ -247,26 +247,10 @@ namespace Microsoft.AspNetCore.Hosting
var currentAssemblyVersion = currentAssembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
currentAssemblyVersion = HtmlEncodeAndReplaceLineBreaks(currentAssemblyVersion);
var osName = string.Empty;
var osVersion = string.Empty;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
osName = OSPlatform.Windows.ToString();
osVersion = Microsoft.Extensions.Internal.RuntimeEnvironment.OperatingSystemVersion;
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
osName = OSPlatform.Linux.ToString();
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
osName = OSPlatform.OSX.ToString();
}
var os = HtmlEncodeAndReplaceLineBreaks(osName);
osVersion = HtmlEncodeAndReplaceLineBreaks(osVersion);
var osDescription = HtmlEncodeAndReplaceLineBreaks(RuntimeInformation.OSDescription);
return string.Format(CultureInfo.InvariantCulture, _errorFooterFormatString, runtimeDisplayName, runtimeArch, clrVersion,
currentAssemblyVersion, os, osVersion);
currentAssemblyVersion, osDescription);
}
private static string HtmlEncodeAndReplaceLineBreaks(string input)

View File

@ -1,3 +1,3 @@
<footer>
{0} {1} v{2}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;Microsoft.AspNetCore.Hosting version {3}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{4} {5}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="http://go.microsoft.com/fwlink/?LinkId=517394">Need help?</a>
{0} {1} v{2}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;Microsoft.AspNetCore.Hosting version {3}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{4}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="http://go.microsoft.com/fwlink/?LinkId=517394">Need help?</a>
</footer>