diff options
author | Marek Habersack <grendel@twistedcode.net> | 2009-09-30 01:52:05 +0400 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2009-09-30 01:52:05 +0400 |
commit | 43e34e922109adb8cbf6aaaf1dbc1dce3350f88f (patch) | |
tree | adc1edf39ab4b500a3234df4aa568dc3390cb8f3 | |
parent | 69154db126871f93fac1476fa16a5fd37941967c (diff) |
Backport of r142934mono-2-6-p1
svn path=/branches/mono-2-6/mcs/; revision=142935
-rw-r--r-- | mcs/class/System.Web/System.Web/ChangeLog | 7 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web/HttpResponse.cs | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog index 01e1ec7aba6..a21b156e0ee 100644 --- a/mcs/class/System.Web/System.Web/ChangeLog +++ b/mcs/class/System.Web/System.Web/ChangeLog @@ -1,3 +1,10 @@ +2009-09-29 Marek Habersack <mhabersack@novell.com> + + * HttpResponse.cs: use full url in redirect if + UseFullyQualifiedRedirectUrl is set to true in httpRuntime + configuration section. Patch from Brett Kiefer + <brett@fogcreek.com>, thanks! Fixes bug #542846 + 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com> * HttpContext.cs: try to load App_GlobalResouces.dll if it has not diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs index 7ed591b59ee..a5e1ad8f9c8 100644 --- a/mcs/class/System.Web/System.Web/HttpResponse.cs +++ b/mcs/class/System.Web/System.Web/HttpResponse.cs @@ -881,6 +881,17 @@ namespace System.Web { StatusCode = 302; url = ApplyAppPathModifier (url); +#if NET_2_0 + HttpRuntimeSection config = WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime") as HttpRuntimeSection; + if (config != null && config.UseFullyQualifiedRedirectUrl) { + var ub = new UriBuilder (context.Request.Url); + ub.Fragment = null; + ub.Password = null; + ub.Query = null; + ub.UserName = null; + url = ub.Uri.ToString (); + } +#endif redirect_location = url; // Text for browsers that can't handle location header |