diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-09-27 11:31:39 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-09-27 11:31:39 +0400 |
commit | d09802508b470424430c708778c37a17e28e5791 (patch) | |
tree | 3bc571ef36d9052bf9c90dc1c30248b59e66157a /mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs | |
parent | ce669ae08c6fa263b06df713d94b1121ce7a7a16 (diff) |
2005-09-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SimpleWorkerRequest.cs: all tests pass now.
svn path=/trunk/mcs/; revision=50826
Diffstat (limited to 'mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs b/mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs index 5f603b0f256..5ee00ba8cac 100644 --- a/mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs +++ b/mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs @@ -48,6 +48,7 @@ namespace System.Web.Hosting { string query; string app_virtual_dir; string app_physical_dir; + string path_info; TextWriter output; bool hosted; @@ -177,7 +178,15 @@ namespace System.Web.Hosting { public override string GetPathInfo () { - return ""; + if (path_info == null) { + int idx = page.IndexOf ('/'); + if (idx >= 0) { + path_info = page.Substring (idx); + } else { + path_info = ""; + } + } + return path_info; } public override string GetQueryString () @@ -212,9 +221,8 @@ namespace System.Web.Hosting { public override string GetUriPath () { - int length = app_virtual_dir.Length; - if (length > 0 && app_virtual_dir [length - 1] == '/') - return app_virtual_dir + page; + if (app_virtual_dir == "/") + return app_virtual_dir + page; return app_virtual_dir + "/" + page; } |