summaryrefslogtreecommitdiffstats
path: root/auth_mellon_util.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_util.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_util.c')
-rw-r--r--auth_mellon_util.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/auth_mellon_util.c b/auth_mellon_util.c
index 7001d98..a3407a6 100644
--- a/auth_mellon_util.c
+++ b/auth_mellon_util.c
@@ -405,13 +405,9 @@ void am_set_nocache(request_rec *r)
{
const char *user_agent;
- /* We set headers in both r->headers_out and r->err_headers_out, so that
- * we can be sure that they will be included.
+ /* Setting the headers inn err_headers_out ensures that they will be
+ * sent for all responses.
*/
- apr_table_setn(r->headers_out,
- "Expires", "Thu, 01 Jan 1970 00:00:00 GMT");
- apr_table_setn(r->headers_out,
- "Cache-Control", "private, must-revalidate");
apr_table_setn(r->err_headers_out,
"Expires", "Thu, 01 Jan 1970 00:00:00 GMT");
apr_table_setn(r->err_headers_out,
@@ -424,8 +420,6 @@ void am_set_nocache(request_rec *r)
if ((user_agent == NULL) ||
(strstr(user_agent, "compatible; MSIE ") == NULL) ||
(strstr(user_agent, "Opera") != NULL)) {
- apr_table_addn(r->headers_out,
- "Cache-Control", "no-cache, no-store");
apr_table_addn(r->err_headers_out,
"Cache-Control", "no-cache, no-store");
}