PR comments

Addressing some outstanding PR feedback.
This commit is contained in:
Praburaj 2015-02-10 14:54:59 -08:00
parent 6444f3e15d
commit 6850035d8e
3 changed files with 10 additions and 4 deletions

View File

@ -42,7 +42,10 @@ namespace StatusCodePagesSample
var builder = new StringBuilder();
builder.AppendLine("<html><body>");
builder.AppendLine("<a href=\"" + context.Request.PathBase + "/missingpage/\">" + context.Request.PathBase + "/missingpage/</a><br>");
builder.AppendLine("<a href=\"" +
WebUtility.HtmlEncode(context.Request.PathBase.ToString()) + "/missingpage/\">" +
WebUtility.HtmlEncode(context.Request.PathBase.ToString()) + "/missingpage/</a><br>");
for (int statusCode = 400; statusCode < 600; statusCode++)
{
builder.AppendLine("<a href=\"?statuscode=" + statusCode + "\">" + statusCode + "</a><br>");

View File

@ -52,9 +52,9 @@ namespace Microsoft.AspNet.Builder
}
/// <summary>
/// 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.
/// </summary>
/// <param name="options"></param>
/// <param name="locationFormat"></param>

View File

@ -9,6 +9,9 @@ using Microsoft.AspNet.WebUtilities;
namespace Microsoft.AspNet.Diagnostics
{
/// <summary>
/// Options for StatusCodePagesMiddleware.
/// </summary>
public class StatusCodePagesOptions
{
public StatusCodePagesOptions()