From e2dcbea4ecd5655392b6cce534eac820c508c699 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Fri, 3 Nov 2017 15:52:59 -0700 Subject: [PATCH] #907 Clarify the encoding requirements for Response.Redirect. (#956) --- src/Microsoft.AspNetCore.Http.Abstractions/HttpResponse.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HttpResponse.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HttpResponse.cs index 626139183e..8a1e5d4908 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HttpResponse.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HttpResponse.cs @@ -94,13 +94,15 @@ namespace Microsoft.AspNetCore.Http /// /// Returns a temporary redirect response (HTTP 302) to the client. /// - /// The URL to redirect the client to. + /// The URL to redirect the client to. This must be properly encoded for use in http headers + /// where only ASCII characters are allowed. public virtual void Redirect(string location) => Redirect(location, permanent: false); /// /// Returns a redirect response (HTTP 301 or HTTP 302) to the client. /// - /// The URL to redirect the client to. + /// The URL to redirect the client to. This must be properly encoded for use in http headers + /// where only ASCII characters are allowed. /// True if the redirect is permanent (301), otherwise false (302). public abstract void Redirect(string location, bool permanent); }