config.status: configure
dh_testdir
- CFLAGS="$(CFLAGS) " ./configure --with-apache-header=/usr/include/apache2 --with-apxs=/usr/bin/apxs2
+ CFLAGS="$(CFLAGS) " ./configure --enable-mysql-cookie --with-mysql-header=/usr/include/mysql --with-mysql-lib-dir=/usr/lib
#define IS_COOKIE_STORE_MEMCACHE(X) ((X) == COOKIE_STORE_TYPE_MEMCACHE)
#define IS_COOKIE_STORE_NONE(X) ((X) == COOKIE_STORE_TYPE_NONE)
+#define COOKIE_LAZY_ON (2)
+#define COOKIE_LAZY_OFF (1)
+#define IS_COOKIE_LAZY(X) ((X)->cookie_lazy_mode == COOKIE_LAZY_ON)
+
#define CONVRULE_ENGINE_ON_BIT (0x00000001)
#define CONVRULE_ENGINE_OFF_BIT (0x00000002)
NULL);
}
- cookie->cookie_id = alloc_cookie_id(r);
+ if (old_cookie_id && IS_COOKIE_LAZY(dconf)) {
+ DBG(r, "LAZY COOKIE save");
+ cookie->cookie_id = apr_pstrdup(r->pool, old_cookie_id);
+ }
+ else {
+ DBG(r, "NO LAZY COOKIE save");
+ cookie->cookie_id = alloc_cookie_id(r);
+ }
DBG(r, "TYPE:[%d]", dconf->cookie_store_type);
{
chxj_delete_cookie(r, old_cookie->cookie_id);
chxj_delete_cookie_expire(r, old_cookie->cookie_id);
- cookie->cookie_id = alloc_cookie_id(r);
+ if (IS_COOKIE_LAZY(dconf)) {
+ DBG(r, "LAZY MODE");
+ cookie->cookie_id = apr_pstrdup(r->pool, old_cookie->cookie_id);
+ }
+ else {
+ DBG(r, "NO LAZY MODE");
+ cookie->cookie_id = alloc_cookie_id(r);
+ }
cookie->cookie_headers = old_cookie->cookie_headers;
store_string = apr_palloc(r->pool, 1);
int
-chxj_delete_cookie_expire_memcache(request_rec *r, mod_chxj_config *m, const char *cookie_id)
+chxj_delete_cookie_expire_memcache(request_rec *r, mod_chxj_config *UNUSED(m), const char *cookie_id)
{
DBG(r, "start chxj_delete_cookie_expire_memcache() cookie_id:[%s]", cookie_id);
/* PASS */
int
-chxj_cookie_expire_gc_memcache(request_rec *r, mod_chxj_config *m)
+chxj_cookie_expire_gc_memcache(request_rec *r, mod_chxj_config *UNUSED(m))
{
DBG(r, "start chxj_cookie_expire_gc_memcache()");
/* PASS */
dconf = (mod_chxj_config *)mconfig;
if (strcasecmp("TRUE",arg) == 0) {
- dconf->cookie_lazy_mode = 2;
+ dconf->cookie_lazy_mode = COOKIE_LAZY_ON;
}
else {
- dconf->cookie_lazy_mode = 1;
+ dconf->cookie_lazy_mode = COOKIE_LAZY_OFF;
}
return NULL;
OR_ALL,
"It specifies preserving of the cookie ahead. (DBM/MYSQL/MEMCACHE)"),
AP_INIT_TAKE1(
- "ChxjCookieLasyMode",
+ "ChxjCookieLazyMode",
cmd_set_cookie_lazy_mode,
NULL,
OR_ALL,