diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-02-04 20:05:45 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-02-04 20:05:45 +0300 |
commit | a95e5d1b256de38fa9c1b3c30e21662c9508b15d (patch) | |
tree | 719c562b42244574a33b76f13bbf97e8aeb2aad9 /mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs | |
parent | ca26c4d1e92f8c85320bb746d86fc26910839543 (diff) |
2003-02-04 Tim Haynes <thaynes@openlinksw.com>
* System.Web/HttpApplicationFactory.cs: fixed HttpRuntime.Close() to
decrement instance counter.
* System.Web.Hosting/SimpleWorkerRequest.cs: changed the initialised
values of _App{Install,Virtual}Path variables
svn path=/trunk/mcs/; revision=11212
Diffstat (limited to 'mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs | 20 |
1 files changed, 16 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 764aa417a18..c79750d161f 100644 --- a/mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs +++ b/mcs/class/System.Web/System.Web.Hosting/SimpleWorkerRequest.cs @@ -43,12 +43,12 @@ namespace System.Web.Hosting o = current.GetData (".hostingVirtualPath"); if (o == null) throw new HttpException ("Cannot get .hostingVirtualPath"); - _AppInstallPath = o.ToString (); + _AppVirtualPath = CheckAndAddVSlash (o.ToString ()); o = current.GetData (".hostingInstallDir"); if (o == null) throw new HttpException ("Cannot get .hostingInstallDir"); - _AppVirtualPath = CheckAndAddSlash (o.ToString ()); + _AppInstallPath = o.ToString (); _Output = Output; if (_AppPhysicalPath == null) @@ -198,9 +198,9 @@ namespace System.Web.Hosting char sep = Path.DirectorySeparatorChar; if (path.StartsWith(_AppVirtualPath)) { if (sep == '/') - return sPath + path.Substring (_AppVirtualPath.Length); + return _AppPhysicalPath + path.Substring (_AppVirtualPath.Length); else - return sPath + path.Substring (_AppVirtualPath.Length).Replace ('/', '\\'); + return _AppPhysicalPath + path.Substring (_AppVirtualPath.Length).Replace ('/', sep); } return null; @@ -243,6 +243,18 @@ namespace System.Web.Hosting return sPath; } + // Creates a path string + private string CheckAndAddVSlash(string sPath) + { + if (null == sPath) + return null; + + if (!sPath.EndsWith ("/")) + return sPath + "/"; + + return sPath; + } + // Create's a path string private string CreatePath (bool bIncludePathInfo) { |