summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2014-12-18 09:50:07 (GMT)
committerOlav Morken <olav.morken@uninett.no>2014-12-18 09:57:16 (GMT)
commit3dd7c01926a64db08bdea3695efd7ff343789b66 (patch)
treeae0620f922a249d3f119f6fffa5b89abf551eb4f
parent61b8ca93d465f702cfe534fcf3e42be9fbc110b3 (diff)
downloadmodmellon-3dd7c01926a64db08bdea3695efd7ff343789b66.zip
modmellon-3dd7c01926a64db08bdea3695efd7ff343789b66.tar.gz
modmellon-3dd7c01926a64db08bdea3695efd7ff343789b66.tar.bz2
Use proper cookie parameters when deleting the cookie.
To make sure that the cookie is deleted, we need to use the same parameters (domain and path) as when we set the cookie. Update the code to use the new am_cookie_params()-function to set the parameters when deleting the cookie.
-rw-r--r--auth_mellon_cookie.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/auth_mellon_cookie.c b/auth_mellon_cookie.c
index e7a580f..35fdef3 100644
--- a/auth_mellon_cookie.c
+++ b/auth_mellon_cookie.c
@@ -219,19 +219,20 @@ void am_cookie_set(request_rec *r, const char *id)
void am_cookie_delete(request_rec *r)
{
const char *name;
+ const char *cookie_params;
char *cookie;
name = am_cookie_name(r);
+ cookie_params = am_cookie_params(r);
/* Format a cookie. To delete a cookie we set the expires-timestamp
* to the past.
*/
cookie = apr_psprintf(r->pool, "%s=NULL;"
- " version=1;"
" expires=Thu, 01-Jan-1970 00:00:00 GMT;"
- " path=/",
- name);
+ " %s",
+ name, cookie_params);
apr_table_addn(r->err_headers_out, "Set-Cookie", cookie);
}