From 6850035d8e4ce2823cfeac091eb5d3e047f7d64c Mon Sep 17 00:00:00 2001 From: Praburaj Date: Tue, 10 Feb 2015 14:54:59 -0800 Subject: [PATCH] PR comments Addressing some outstanding PR feedback. --- samples/StatusCodePagesSample/Startup.cs | 5 ++++- .../StatusCodePagesExtensions.cs | 6 +++--- src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/samples/StatusCodePagesSample/Startup.cs b/samples/StatusCodePagesSample/Startup.cs index dbe85fa3f4..2c81bb949b 100644 --- a/samples/StatusCodePagesSample/Startup.cs +++ b/samples/StatusCodePagesSample/Startup.cs @@ -42,7 +42,10 @@ namespace StatusCodePagesSample var builder = new StringBuilder(); builder.AppendLine(""); - builder.AppendLine("" + context.Request.PathBase + "/missingpage/
"); + builder.AppendLine("" + + WebUtility.HtmlEncode(context.Request.PathBase.ToString()) + "/missingpage/
"); + for (int statusCode = 400; statusCode < 600; statusCode++) { builder.AppendLine("" + statusCode + "
"); diff --git a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs index 0656c5b525..42c41a353a 100644 --- a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs +++ b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs @@ -52,9 +52,9 @@ namespace Microsoft.AspNet.Builder } /// - /// Specifies that responses should be handled by redirecting with the given location url template. - /// This may include a '{0}' placeholder for the status code. Ulrs starting with '~' will have PathBase prepeneded, - /// where any other url will be used as is. + /// Specifies that responses should be handled by redirecting with the given location URL template. + /// This may include a '{0}' placeholder for the status code. URLs starting with '~' will have PathBase prepended, + /// where any other URL will be used as is. /// /// /// diff --git a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs index 6a3ee7de16..242ab5b96d 100644 --- a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs +++ b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs @@ -9,6 +9,9 @@ using Microsoft.AspNet.WebUtilities; namespace Microsoft.AspNet.Diagnostics { + /// + /// Options for StatusCodePagesMiddleware. + /// public class StatusCodePagesOptions { public StatusCodePagesOptions()