]> granicus.if.org Git - apache/commitdiff
PR29755: mod_usertrack gets skipped when modules return a status code from
authorEric Covener <covener@apache.org>
Sat, 6 Aug 2011 23:15:11 +0000 (23:15 +0000)
committerEric Covener <covener@apache.org>
Sat, 6 Aug 2011 23:15:11 +0000 (23:15 +0000)
their fixup hook, and headers are also not sent on non-2xx responses.

Submitted by:  Sami J. Mäkinen
Reviewed by: Eric Covener (modified to just run REALLY_FIRST)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154620 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/metadata/mod_usertrack.c

diff --git a/CHANGES b/CHANGES
index 611eddfd7e4b82c10e5ea64b843bc0aa288b26ad..d67fd84a8d56b6af256e48a119b70d9fb5f1c7de 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,11 @@
                                                          -*- coding: utf-8 -*-
-
 Changes with Apache 2.3.15
 
+  *) mod_usertrack: Run mod_usertrack earlier in the fixups hook to ensure the 
+     cookie is set when modules such as mod_rewrite trigger a redirect. Also
+     use r->err_headers_out for the cookie, for the same reason.  PR29755.
+     [Sami J. Mäkinen <sjm almamedia fi>, Eric Covener]
+
   *) mod_proxy_http, mod_proxy_connect: Add 'proxy-status' and
      'proxy-source-port' request notes for logging. PR 30195. [Stefan Fritsch]
 
index d7aab217a6d18da70d8587a4ff3790771f7b4d7d..45a1e85540c0008fda4afc02653e0b3d8150edb1 100644 (file)
@@ -146,7 +146,7 @@ static void make_cookie(request_rec *r)
                                  NULL);
     }
 
-    apr_table_addn(r->headers_out,
+    apr_table_addn(r->err_headers_out,
                    (dcfg->style == CT_COOKIE2 ? "Set-Cookie2" : "Set-Cookie"),
                    new_cookie);
     apr_table_setn(r->notes, "cookie", apr_pstrdup(r->pool, cookiebuf));   /* log first time */
@@ -439,7 +439,7 @@ static const command_rec cookie_log_cmds[] = {
 
 static void register_hooks(apr_pool_t *p)
 {
-    ap_hook_fixups(spot_cookie,NULL,NULL,APR_HOOK_FIRST);
+    ap_hook_fixups(spot_cookie,NULL,NULL,APR_HOOK_REALLY_FIRST);
 }
 
 AP_DECLARE_MODULE(usertrack) = {