diff options
author | Graham Leggett <minfrin@apache.org> | 2008-08-30 15:37:52 +0200 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2008-08-30 15:37:52 +0200 |
commit | 4ed2378c5ea9fe2e5d0669c681f4bbb930c82c9b (patch) | |
tree | 913f21ba4b5d6a130034210609096310328ffc68 /modules/session/mod_session_dbd.c | |
parent | mod_auth_form: Make sure the logged in user is populated correctly (diff) | |
download | apache2-4ed2378c5ea9fe2e5d0669c681f4bbb930c82c9b.tar.xz apache2-4ed2378c5ea9fe2e5d0669c681f4bbb930c82c9b.zip |
mod_session_cookie, mod_session_dbd: Make sure cookies are set both
within the output headers and error output headers, so that the
session is maintained across redirects.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@690501 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/session/mod_session_dbd.c')
-rw-r--r-- | modules/session/mod_session_dbd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/session/mod_session_dbd.c b/modules/session/mod_session_dbd.c index 37ad99d869..7df10cd82d 100644 --- a/modules/session/mod_session_dbd.c +++ b/modules/session/mod_session_dbd.c @@ -54,7 +54,7 @@ static void (*session_dbd_prepare_fn) (server_rec *, const char *, const char *) /** * Initialise the database. - * + * * If the mod_dbd module is missing, this method will return APR_EGENERAL. */ static apr_status_t dbd_init(request_rec *r, const char *query, ap_dbd_t **dbdp, @@ -86,7 +86,7 @@ static apr_status_t dbd_init(request_rec *r, const char *query, ap_dbd_t **dbdp, "failed to find the prepared statement called '%s'", query); return APR_EGENERAL; } - + *dbdp = dbd; *statementp = statement; @@ -374,7 +374,7 @@ static apr_status_t dbd_remove(request_rec * r, const char *key) /** * Clean out expired sessions. - * + * * TODO: We need to figure out a way to clean out expired sessions from the database. * The monitor hook doesn't help us that much, as we have no handle into the * server, and so we need to come up with a way to do this safely. @@ -431,12 +431,12 @@ static int session_dbd_save(request_rec * r, session_rec * z) /* create RFC2109 compliant cookie */ if (conf->name_set) { - ap_cookie_write(r, conf->name, buffer, conf->name_attrs, z->maxage); + ap_cookie_write(r, conf->name, buffer, conf->name_attrs, z->maxage, r->headers_out, r->err_headers_out, NULL); } /* create RFC2965 compliant cookie */ if (conf->name2_set) { - ap_cookie_write2(r, conf->name2, buffer, conf->name2_attrs, z->maxage); + ap_cookie_write2(r, conf->name2, buffer, conf->name2_attrs, z->maxage, r->headers_out, r->err_headers_out, NULL); } return OK; @@ -485,7 +485,7 @@ static void *create_session_dbd_dir_config(apr_pool_t * p, char *dummy) (session_dbd_dir_conf *) apr_pcalloc(p, sizeof(session_dbd_dir_conf)); new->remove = 1; - + new->selectlabel = "selectsession"; new->insertlabel = "insertsession"; new->updatelabel = "updatesession"; |