httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r654137 - /httpd/httpd/trunk/modules/session/mod_session_cookie.c
Date Wed, 07 May 2008 15:03:59 GMT
Author: minfrin
Date: Wed May  7 08:03:58 2008
New Revision: 654137

URL: http://svn.apache.org/viewvc?rev=654137&view=rev
Log:
Fix the method used to detect the root of the request tree when subrequests
are present.

Modified:
    httpd/httpd/trunk/modules/session/mod_session_cookie.c

Modified: httpd/httpd/trunk/modules/session/mod_session_cookie.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session_cookie.c?rev=654137&r1=654136&r2=654137&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session_cookie.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session_cookie.c Wed May  7 08:03:58 2008
@@ -117,7 +117,16 @@
     const char *val = NULL;
     const char *note = NULL;
     const char *name = NULL;
-    request_rec *m = r->main ? r->main : r;
+    request_rec *m = r;
+
+    /* find the first redirect */
+    while (m->prev) {
+        m = m->prev;
+    }
+    /* find the main request */
+    while (m->main) {
+        m = m->main;
+    }
 
     /* is our session in a cookie? */
     if (conf->name2_set) {



Mime
View raw message