You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2008/05/07 17:03:59 UTC
svn commit: r654137 - /httpd/httpd/trunk/modules/session/mod_session_cookie.c
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) {