Author: krasnov
Date: 2007-12-23 07:53:15 -0500 (Sun, 23 Dec 2007)
New Revision: 91828

Modified:
   
branches/mainsoft/gh20/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs
Log:
fixed AppDomainVirtualPath initialization when application is deployed in 
virtual host root ("/")

Modified: 
branches/mainsoft/gh20/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs
       2007-12-23 12:10:17 UTC (rev 91827)
+++ 
branches/mainsoft/gh20/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs
       2007-12-23 12:53:15 UTC (rev 91828)
@@ -134,7 +134,10 @@
                                // Very important - to update Virtual Path!!!
                                AppDomain servletDomain = 
(AppDomain)this.getServletContext().getAttribute(J2EEConsts.APP_DOMAIN);
                                if (!_appVirDirInited) {
-                                       servletDomain.SetData 
(IAppDomainConfig.APP_VIRT_DIR, req.getContextPath ());
+                                       string appVPath = req.getContextPath ();
+                                       if (appVPath == null || appVPath.Length 
== 0)
+                                               appVPath = "/";
+                                       servletDomain.SetData 
(IAppDomainConfig.APP_VIRT_DIR, appVPath);
                                        servletDomain.SetData 
(".hostingVirtualPath", req.getContextPath ());
                                        _appVirDirInited = true;
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to