diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2006-04-24 19:44:56 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2006-04-24 19:44:56 +0400 |
commit | 2dbfa821bc78a2d0ff1706eb56a5f3b0ef6532a9 (patch) | |
tree | 57a60cabaad026bdef8c9d4e97a1bb4b8423dc40 | |
parent | 7f04a3171fea1718d01307432d5a6faff3b58dae (diff) |
2006-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpServerUtility.cs: don't reset the query string in Execute() when
the path does not contain it and we have one from the previous request.
Fixes bug #78177.
svn path=/branches/mono-1-1-13/mcs/; revision=59817
-rw-r--r-- | mcs/class/System.Web/System.Web/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web/HttpServerUtility.cs | 14 |
2 files changed, 11 insertions, 9 deletions
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog index 7e80db0aa37..64c367d5bf0 100644 --- a/mcs/class/System.Web/System.Web/ChangeLog +++ b/mcs/class/System.Web/System.Web/ChangeLog @@ -1,3 +1,9 @@ +2006-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * HttpServerUtility.cs: don't reset the query string in Execute() when + the path does not contain it and we have one from the previous request. + Fixes bug #78177. + 2006-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com> * HttpResponse.cs: diff --git a/mcs/class/System.Web/System.Web/HttpServerUtility.cs b/mcs/class/System.Web/System.Web/HttpServerUtility.cs index 230cc2fa70b..18327137e20 100644 --- a/mcs/class/System.Web/System.Web/HttpServerUtility.cs +++ b/mcs/class/System.Web/System.Web/HttpServerUtility.cs @@ -98,21 +98,17 @@ namespace System.Web { if (path.IndexOf (':') != -1) throw new ArgumentException ("Invalid path."); + HttpRequest request = context.Request; + string oldQuery = request.QueryStringRaw; int qmark = path.IndexOf ('?'); - string query; if (qmark != -1) { - query = path.Substring (qmark + 1); + request.QueryStringRaw = path.Substring (qmark + 1); path = path.Substring (0, qmark); - } else { - query = ""; + } else if (!preserveQuery) { + request.QueryStringRaw = ""; } - HttpRequest request = context.Request; HttpResponse response = context.Response; - - string oldQuery = request.QueryStringRaw; - request.QueryStringRaw = query; - WebROCollection oldForm = null; if (!preserveQuery) { oldForm = request.Form as WebROCollection; |