From: Eric Covener Date: Sat, 6 Aug 2011 23:15:11 +0000 (+0000) Subject: PR29755: mod_usertrack gets skipped when modules return a status code from X-Git-Tag: 2.3.15~406 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f19d2caa4d2e5317797c7f7437ff1ee1858a5190;p=thirdparty%2Fapache%2Fhttpd.git PR29755: mod_usertrack gets skipped when modules return a status code from 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 --- diff --git a/CHANGES b/CHANGES index 611eddfd7e4..d67fd84a8d5 100644 --- 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 , Eric Covener] + *) mod_proxy_http, mod_proxy_connect: Add 'proxy-status' and 'proxy-source-port' request notes for logging. PR 30195. [Stefan Fritsch] diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c index d7aab217a6d..45a1e85540c 100644 --- a/modules/metadata/mod_usertrack.c +++ b/modules/metadata/mod_usertrack.c @@ -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) = {