Author: mhabersack
Date: 2007-09-18 04:38:35 -0400 (Tue, 18 Sep 2007)
New Revision: 85955

Modified:
   trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
   trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
   trunk/mcs/class/System.Web/System.Web.SessionState_2.0/ChangeLog
   trunk/mcs/class/System.Web/System.Web.SessionState_2.0/SessionIDManager.cs
Log:
2007-09-18  Marek Habersack  <[EMAIL PROTECTED]>

            * SessionStateModule.cs: preserve the query part of the url when
            redirecting with cookieless sessions active. Fixes bug #318790
2007-09-18  Marek Habersack  <[EMAIL PROTECTED]>

            * SessionIDManager.cs: preserve the query part of the url when
            redirecting with cookieless sessions active. Fixes bug #318790


Modified: trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog        
2007-09-18 08:36:12 UTC (rev 85954)
+++ trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog        
2007-09-18 08:38:35 UTC (rev 85955)
@@ -1,3 +1,8 @@
+2007-09-18  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * SessionStateModule.cs: preserve the query part of the url when
+       redirecting with cookieless sessions active. Fixes bug #318790
+
 2007-08-08  Marek Habersack  <[EMAIL PROTECTED]>
 
        * SessionDictionary.cs: do not use lock (this), replace it

Modified: 
trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs    
2007-09-18 08:36:12 UTC (rev 85954)
+++ trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs    
2007-09-18 08:38:35 UTC (rev 85955)
@@ -203,7 +203,9 @@
                                string id = context.Session.SessionID;
                                if (isNew && config.CookieLess) {
                                        request.SetHeader (HeaderName, id);
-                                       response.Redirect 
(UrlUtils.InsertSessionId (id, request.FilePath));
+                                       UriBuilder newUri = new UriBuilder 
(request.Url);
+                                       newUri.Path = UrlUtils.InsertSessionId 
(id, request.FilePath);
+                                       response.Redirect 
(newUri.Uri.PathAndQuery);
                                } else if (isNew) {
                                        HttpCookie cookie = new HttpCookie 
(CookieName, id);
                                        cookie.Path = request.ApplicationPath;

Modified: trunk/mcs/class/System.Web/System.Web.SessionState_2.0/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState_2.0/ChangeLog    
2007-09-18 08:36:12 UTC (rev 85954)
+++ trunk/mcs/class/System.Web/System.Web.SessionState_2.0/ChangeLog    
2007-09-18 08:38:35 UTC (rev 85955)
@@ -1,3 +1,8 @@
+2007-09-18  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * SessionIDManager.cs: preserve the query part of the url when
+       redirecting with cookieless sessions active. Fixes bug #318790
+
 2007-09-07  Marek Habersack  <[EMAIL PROTECTED]>
 
        * SessionInProcHandler.cs: properly clone the

Modified: 
trunk/mcs/class/System.Web/System.Web.SessionState_2.0/SessionIDManager.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState_2.0/SessionIDManager.cs  
2007-09-18 08:36:12 UTC (rev 85954)
+++ trunk/mcs/class/System.Web/System.Web.SessionState_2.0/SessionIDManager.cs  
2007-09-18 08:38:35 UTC (rev 85955)
@@ -112,19 +112,21 @@
                {
                        if (!Validate (id))
                                throw new HttpException ("Invalid session ID");
-                       
+
+                       HttpRequest request = context.Request;
                        if (!SessionStateModule.IsCookieLess (context, config)) 
{
                                HttpCookie cookie = new HttpCookie 
(config.CookieName, id);
-                               cookie.Path = context.Request.ApplicationPath;
+                               cookie.Path = request.ApplicationPath;
                                context.Response.AppendCookie (cookie);
                                cookieAdded = true;
                                redirected = false;
                        } else {
-                               context.Request.SetHeader 
(SessionStateModule.HeaderName, id);
+                               request.SetHeader 
(SessionStateModule.HeaderName, id);
                                cookieAdded = false;
                                redirected = true;
-                               string newUri = UrlUtils.InsertSessionId (id, 
context.Request.FilePath);
-                               context.Response.Redirect (newUri, false);
+                               UriBuilder newUri = new UriBuilder 
(request.Url);
+                               newUri.Path = UrlUtils.InsertSessionId (id, 
request.FilePath);
+                               context.Response.Redirect 
(newUri.Uri.PathAndQuery, false);
                        }
                }
 

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

Reply via email to