cookie->cookie_id = apr_pstrdup(r->pool, old_cookie_id);
}
else {
- DBG(r, "REQ[%X] NO LAZY COOKIE save",(unsigned int)(apr_size_t)r);
- cookie->cookie_id = alloc_cookie_id(r);
+ if (old_cookie_id && apr_table_get(r->headers_in, "X-Chxj-Forward")) {
+ DBG(r, "REQ[%X] NO LAZY COOKIE(X-Chxj-Forward) save",(unsigned int)(apr_size_t)r);
+ cookie->cookie_id = apr_pstrdup(r->pool, old_cookie_id);
+ }
+ else {
+ DBG(r, "REQ[%X] NO LAZY COOKIE save",(unsigned int)(apr_size_t)r);
+ cookie->cookie_id = alloc_cookie_id(r);
+ }
}
DBG(r, "REQ[%X] TYPE:[%d]", (unsigned int)(apr_size_t)r, dconf->cookie_store_type);
cookie = chxj_load_cookie(r, value);
DBG(r, "REQ[%X] call end chxj_load_cookie()", (unsigned int)(apr_size_t)r);
if (! no_update_flag && cookie) {
- chxj_update_cookie(r, cookie);
+ cookie = chxj_update_cookie(r, cookie);
}
chxj_cookie_unlock(r, lock);
}
cookie = chxj_load_cookie(r, value);
DBG(r, "REQ[%X] call end chxj_load_cookie()", (unsigned int)(apr_size_t)r);
if (! no_update_flag && cookie) {
- chxj_update_cookie(r, cookie);
+ cookie = chxj_update_cookie(r, cookie);
}
chxj_cookie_unlock(r, lock);
}
url_path = apr_psprintf(pool, "%s%s", dconf->forward_url_base, r->uri);
}
else {
-#if 0
- url_path = apr_psprintf(pool, "%s://%s:%d%s", chxj_apache_run_http_scheme(r), ap_get_server_name(r), ap_get_server_port(r), r->uri);
-#else
url_path = apr_psprintf(pool, "%s://%s:%d%s", chxj_apache_run_http_scheme(r), "127.0.0.1", ap_get_server_port(r), r->uri);
-#endif
}
if (r->args) {
url_path = apr_pstrcat(pool, url_path, "?", r->args, NULL);