diff options
author | Graham Leggett <minfrin@apache.org> | 2008-08-29 23:49:27 +0200 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2008-08-29 23:49:27 +0200 |
commit | 0ec83e8b1b4000ced0cccfd74332065d273231c8 (patch) | |
tree | 3855b0f35a9ff3243e9b17f7245e4b03061cc30e /server/util_cookies.c | |
parent | Add option to insert something in autoindex head. (diff) | |
download | apache2-0ec83e8b1b4000ced0cccfd74332065d273231c8.tar.xz apache2-0ec83e8b1b4000ced0cccfd74332065d273231c8.zip |
mod_session_cookie: Make sure that cookie attributes are correctly
included in the blank cookie when cookies are removed. This fixes an
inability to log out when using mod_auth_form.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@690400 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_cookies.c')
-rw-r--r-- | server/util_cookies.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/util_cookies.c b/server/util_cookies.c index 45ff8dad90..20aa5d02b5 100644 --- a/server/util_cookies.c +++ b/server/util_cookies.c @@ -99,12 +99,12 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2, co * @param r The request * @param name The name of the cookie. */ -AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name) +AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name, const char *attrs) { /* create RFC2109 compliant cookie */ char *rfc2109 = apr_pstrcat(r->pool, name, "=;", - CLEAR_ATTRS, NULL); + attrs ? attrs : CLEAR_ATTRS, NULL); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX "user '%s' removed cookie: '%s'", r->user, rfc2109); apr_table_addn(r->headers_out, SET_COOKIE, rfc2109); @@ -119,12 +119,12 @@ AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name) * @param r The request * @param name2 The name of the cookie. */ -AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2) +AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2, const char *attrs2) { /* create RFC2965 compliant cookie */ char *rfc2965 = apr_pstrcat(r->pool, name2, "=;", - CLEAR_ATTRS, NULL); + attrs2 ? attrs2 : CLEAR_ATTRS, NULL); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX "user '%s' removed cookie2: '%s'", r->user, rfc2965); apr_table_addn(r->headers_out, SET_COOKIE2, rfc2965); |