cookie = (cookie_t*)apr_palloc(r->pool, sizeof(cookie_t));
cookie->cookie_headers = NULL;
- cookie->cookie_id = apr_pstrdup(r->pool, cookie_id);
+ cookie->cookie_id = chxj_url_decode(r->pool, apr_pstrdup(r->pool, cookie_id));
+ cookie->cookie_id = chxj_url_encode(r->pool, cookie->cookie_id);
+
dconf = chxj_get_module_config(r->per_dir_config, &chxj_module);
entryp = chxj_apply_convrule(r, dconf->convrules);
static int chxj_convert_input_header(request_rec *r,chxjconvrule_entry *entryp);
static void s_add_cookie_id_if_has_location_header(request_rec *r, cookie_t *cookie);
+static void s_clear_cookie_header(request_rec *r, device_table *spec);
/**
* Only when User-Agent is specified, the User-Agent header is camouflaged.
DBG(r, "end chxj_headers_fixup()");
return DECLINED;
}
+ if (r->method_number == M_POST) {
+ if (!apr_table_get(r->headers_in, "X-Chxj-Forward")) {
+ s_clear_cookie_header(r, spec);
+ }
+ }
+ else {
+ s_clear_cookie_header(r, spec);
+ }
switch(spec->html_spec_type) {
case CHXJ_SPEC_Chtml_1_0:
return DECLINED;
}
+
+static void
+s_clear_cookie_header(request_rec *r, device_table *spec)
+{
+ switch(spec->html_spec_type) {
+ case CHXJ_SPEC_Chtml_1_0:
+ case CHXJ_SPEC_Chtml_2_0:
+ case CHXJ_SPEC_Chtml_3_0:
+ case CHXJ_SPEC_Chtml_4_0:
+ case CHXJ_SPEC_Chtml_5_0:
+ case CHXJ_SPEC_Chtml_6_0:
+ case CHXJ_SPEC_Chtml_7_0:
+ case CHXJ_SPEC_XHtml_Mobile_1_0:
+ case CHXJ_SPEC_Jhtml:
+ apr_table_unset(r->headers_in, "Cookie");
+ break;
+ default:
+ break;
+ }
+}
+
+
/**
* It converts it from CHTML into XXML corresponding to each model.
*