Permalink
Browse files

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
  • Loading branch information...
1 parent 7f04a31 commit 2dbfa821bc78a2d0ff1706eb56a5f3b0ef6532a9 @gonzalop gonzalop committed Apr 24, 2006
Showing with 11 additions and 9 deletions.
  1. +6 −0 mcs/class/System.Web/System.Web/ChangeLog
  2. +5 −9 mcs/class/System.Web/System.Web/HttpServerUtility.cs
@@ -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:
@@ -98,21 +98,17 @@ void Execute (string path, TextWriter writer, bool preserveQuery)
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;

0 comments on commit 2dbfa82

Please sign in to comment.