summaryrefslogtreecommitdiffstats
path: root/auth_mellon_cookie.c
diff options
context:
space:
mode:
authorolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2012-01-12 13:30:39 +0000
committerolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2012-01-12 13:30:39 +0000
commit1b8d4993cda8d51371380c3a7e9feb3bb3bd240b (patch)
tree42bec627d1941e5d469bab75176a79e2a7474164 /auth_mellon_cookie.c
parent3982cb840fe5d20c56b6397f8c587c59468fe97b (diff)
downloadmod_auth_mellon-1b8d4993cda8d51371380c3a7e9feb3bb3bd240b.tar.gz
mod_auth_mellon-1b8d4993cda8d51371380c3a7e9feb3bb3bd240b.tar.xz
mod_auth_mellon-1b8d4993cda8d51371380c3a7e9feb3bb3bd240b.zip
Do not set headers twice.
For historic reasons, we added several headers to both "headers_out" and "err_headers_out". This has the unfortunate side effect of sending the headers twice. This change modifies the code to only add those headers to "err_headers_out", which is sent both for successful requests and for errors. git-svn-id: https://modmellon.googlecode.com/svn/trunk@145 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_cookie.c')
-rw-r--r--auth_mellon_cookie.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/auth_mellon_cookie.c b/auth_mellon_cookie.c
index b321651..102e583 100644
--- a/auth_mellon_cookie.c
+++ b/auth_mellon_cookie.c
@@ -166,12 +166,9 @@ void am_cookie_set(request_rec *r, const char *id)
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"cookie_set: %s", cookie);
- /* For now we're setting the cookie in both header tables since
- * it is unclear which the user will be sent. After a minor release
- * this suddenly changed from headers_out to err_headers_out, so to
- * be on the safe side...
+ /* Setting the headers inn err_headers_out ensures that they will be
+ * sent for all responses.
*/
- apr_table_addn(r->headers_out, "Set-Cookie", cookie);
apr_table_addn(r->err_headers_out, "Set-Cookie", cookie);
/* Add a note on the current request, to allow us to retrieve this
@@ -208,6 +205,5 @@ void am_cookie_delete(request_rec *r)
" path=/",
name);
- apr_table_addn(r->headers_out, "Set-Cookie", cookie);
apr_table_addn(r->err_headers_out, "Set-Cookie", cookie);
}