Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-10-06 08:50:46 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-10-06 08:50:46 +0400
commit1aed6001de1cb2f78c931fedfcc9dc5df7ac050b (patch)
tree5d206956755f1967932e3ba48ab046fb7eeb61ba
parent19141d7309f42d2da709d4310898073455913f80 (diff)
2004-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* System.Web/HttpRequest.cs: CurrentExecutionFilePath is the one that changes when Transfer or Execute are used, not FilePath. * System.Web/HttpServerUtility.cs: moved form saving/restoring from Transfer to Execute, as it's needed there too. the query string is correctly set now. Fixes bug #67388. * System.Web/HttpContext.cs: * System.Web.SessionState/SessionStateModule.cs: use SetCurrentExePath instead of SetFilePath. svn path=/branches/mono-1-0/mcs/; revision=34749
-rw-r--r--mcs/class/System.Web/System.Web.SessionState/ChangeLog4
-rw-r--r--mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs2
-rw-r--r--mcs/class/System.Web/System.Web/ChangeLog11
-rw-r--r--mcs/class/System.Web/System.Web/HttpContext.cs2
-rw-r--r--mcs/class/System.Web/System.Web/HttpRequest.cs8
-rw-r--r--mcs/class/System.Web/System.Web/HttpServerUtility.cs34
6 files changed, 40 insertions, 21 deletions
diff --git a/mcs/class/System.Web/System.Web.SessionState/ChangeLog b/mcs/class/System.Web/System.Web.SessionState/ChangeLog
index b8e60f21cdd..65d40fbe0bc 100644
--- a/mcs/class/System.Web/System.Web.SessionState/ChangeLog
+++ b/mcs/class/System.Web/System.Web.SessionState/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * SessionStateModule.cs: use SetCurrentExePath instead of SetFilePath.
+
2004-09-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpSessionState.cs: don't share static session objects declared in
diff --git a/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs b/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
index cbee9af88f8..c909e2a4086 100644
--- a/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
+++ b/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
@@ -109,7 +109,7 @@ namespace System.Web.SessionState
if (id == null)
return;
- context.Request.SetFilePath (UrlUtils.RemoveSessionId (base_path,
+ context.Request.SetCurrentExePath (UrlUtils.RemoveSessionId (base_path,
context.Request.FilePath));
context.Request.SetHeader (HeaderName, id);
}
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog
index 712b9816490..9bfa82351cf 100644
--- a/mcs/class/System.Web/System.Web/ChangeLog
+++ b/mcs/class/System.Web/System.Web/ChangeLog
@@ -1,3 +1,14 @@
+2004-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpRequest.cs: CurrentExecutionFilePath is the one that
+ changes when Transfer or Execute are used, not FilePath.
+
+ * HttpServerUtility.cs: moved form saving/restoring from
+ Transfer to Execute, as it's needed there too. the query string is
+ correctly set now. Fixes bug #67388.
+
+ * HttpContext.cs: use SetCurrentExePath instead of SetFilePath.
+
2004-10-03 Ben Maurer <bmaurer@ximian.com>
* HttpResponse.cs: use UtcNow
diff --git a/mcs/class/System.Web/System.Web/HttpContext.cs b/mcs/class/System.Web/System.Web/HttpContext.cs
index dcf5d7dc089..4d28af400ad 100644
--- a/mcs/class/System.Web/System.Web/HttpContext.cs
+++ b/mcs/class/System.Web/System.Web/HttpContext.cs
@@ -403,7 +403,7 @@ namespace System.Web
throw new HttpException (404, "The virtual path '" + path +
"' maps to another application.");
- Request.SetFilePath (path);
+ Request.SetCurrentExePath (path);
Request.QueryStringRaw = query;
}
diff --git a/mcs/class/System.Web/System.Web/HttpRequest.cs b/mcs/class/System.Web/System.Web/HttpRequest.cs
index 5b1cbef349c..48140d4c1f9 100644
--- a/mcs/class/System.Web/System.Web/HttpRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpRequest.cs
@@ -88,6 +88,7 @@ namespace System.Web {
Stream userFilter;
HttpRequestStream requestFilter;
string clientTarget;
+ string currentExePath;
#if NET_1_1
bool validateCookies;
bool validateForm;
@@ -503,6 +504,9 @@ namespace System.Web {
public string CurrentExecutionFilePath {
get {
+ if (currentExePath != null)
+ return currentExePath;
+
return FilePath;
}
}
@@ -1139,9 +1143,9 @@ namespace System.Web {
}
#endif
- internal void SetFilePath (string filePath)
+ internal void SetCurrentExePath (string filePath)
{
- _sFilePath = filePath;
+ currentExePath = filePath;
_sRequestRootVirtualDir = null;
baseVirtualDir = null;
}
diff --git a/mcs/class/System.Web/System.Web/HttpServerUtility.cs b/mcs/class/System.Web/System.Web/HttpServerUtility.cs
index 0abb629c828..86c925de04b 100644
--- a/mcs/class/System.Web/System.Web/HttpServerUtility.cs
+++ b/mcs/class/System.Web/System.Web/HttpServerUtility.cs
@@ -192,19 +192,26 @@ namespace System.Web
} else {
query = "";
}
-
- string filePath = _Context.Request.MapPath (path);
+
+ HttpRequest request = _Context.Request;
HttpResponse response = _Context.Response;
+
+ string oldQuery = request.QueryStringRaw;
+ request.QueryStringRaw = query;
+
+ HttpValueCollection oldForm = null;
+ if (!preserveQuery) {
+ oldForm = _Context.Request.Form as HttpValueCollection;
+ _Context.Request.SetForm (new HttpValueCollection ());
+ }
+
+ string filePath = _Context.Request.MapPath (path);
TextWriter output = writer;
if (output == null)
output = response.Output;
- HttpRequest request = _Context.Request;
string oldFilePath = request.FilePath;
- request.SetFilePath (UrlUtils.Combine (_Context.Request.BaseVirtualDir, path));
- string oldQuery = request.QueryStringRaw;
-
- if (!preserveQuery) request.QueryStringRaw = query;
+ request.SetCurrentExePath (UrlUtils.Combine (_Context.Request.BaseVirtualDir, path));
IHttpHandler handler = _Context.ApplicationInstance.CreateHttpHandler (_Context,
request.RequestType,
path,
@@ -221,9 +228,11 @@ namespace System.Web
asyncHandler.EndProcessRequest (ar);
}
} finally {
- request.SetFilePath (oldFilePath);
+ request.SetCurrentExePath (oldFilePath);
request.QueryStringRaw = oldQuery;
response.SetTextWriter (previous);
+ if (!preserveQuery)
+ _Context.Request.SetForm (oldForm);
}
}
@@ -324,16 +333,7 @@ namespace System.Web
/// they are cleared. The default is false. </param>
public void Transfer (string path, bool preserveForm)
{
- HttpValueCollection oldForm = null;
- if (!preserveForm) {
- oldForm = _Context.Request.Form as HttpValueCollection;
- _Context.Request.SetForm (new HttpValueCollection ());
- }
-
Execute (path, null, preserveForm);
- if (!preserveForm)
- _Context.Request.SetForm (oldForm);
-
_Context.Response.End ();
}