|
Apache HTTPD
|
#include "mod_session.h"#include "apr_lib.h"#include "apr_strings.h"#include "http_log.h"#include "util_cookies.h"#include "apr_dbd.h"#include "mod_dbd.h"#include "mpm_common.h"Go to the source code of this file.
Classes | |
| struct | session_dbd_dir_conf |
Macros | |
| #define | MOD_SESSION_DBD "mod_session_dbd" |
Variables | |
| static ap_dbd_t *(* | session_dbd_acquire_fn )(request_rec *) = NULL |
| static void(* | session_dbd_prepare_fn )(server_rec *, const char *, const char *) = NULL |
| static const command_rec | session_dbd_cmds [] |
| static int *const | aplog_module_index = &( session_dbd_module.module_index) |
| #define MOD_SESSION_DBD "mod_session_dbd" |
Definition at line 26 of file mod_session_dbd.c.
Sanity check a given string that it exists, is not empty, and does not contain special characters.
Definition at line 536 of file mod_session_dbd.c.
|
static |
Definition at line 493 of file mod_session_dbd.c.
|
static |
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.
Definition at line 383 of file mod_session_dbd.c.
|
static |
Initialise the database.
If the mod_dbd module is missing, this method will return APR_EGENERAL.
Definition at line 59 of file mod_session_dbd.c.
|
static |
Load the session by the key specified.
The session value is allocated using the passed apr_pool_t.
Definition at line 100 of file mod_session_dbd.c.
|
static |
Remove the session by the key specified.
Definition at line 339 of file mod_session_dbd.c.
|
static |
Save the session by the key specified.
Definition at line 258 of file mod_session_dbd.c.
|
static |
Definition at line 508 of file mod_session_dbd.c.
|
static |
Definition at line 623 of file mod_session_dbd.c.
|
static |
Load the session by firing off a dbd query.
If the session is anonymous, the session key will be extracted from the cookie specified. Failing that, the session key will be extracted from the GET parameters.
If the session is keyed by the username, the session will be extracted by that.
If no session is found, an empty session will be created.
On success, this returns OK.
< Module declines to handle
< Module has handled this stage.
< Module declines to handle
< Module has handled this stage.
Definition at line 167 of file mod_session_dbd.c.
|
static |
This function performs housekeeping on the database, deleting expired sessions.
< Module has handled this stage.
Definition at line 485 of file mod_session_dbd.c.
|
static |
Save the session by firing off a dbd query.
If the session is anonymous, save the session and write a cookie containing the uuid.
If the session is keyed to the username, save the session using the username as a key.
On success, this method will return APR_SUCCESS.
| r | The request pointer. |
| z | A pointer to where the session will be written. |
< Module has handled this stage.
< Module has handled this stage.
< Module declines to handle
Definition at line 404 of file mod_session_dbd.c.
Definition at line 568 of file mod_session_dbd.c.
Definition at line 583 of file mod_session_dbd.c.
Definition at line 558 of file mod_session_dbd.c.
Definition at line 547 of file mod_session_dbd.c.
Definition at line 630 of file mod_session_dbd.c.
|
static |
Definition at line 51 of file mod_session_dbd.c.
|
static |
Definition at line 598 of file mod_session_dbd.c.
|
static |
Definition at line 52 of file mod_session_dbd.c.