sec[url-buf] = 0;
url++;
url = chxj_encoding_parameter(r, url);
- url = chxj_add_cookie_parameter(r, url, jxhtml->cookie);
W_L(" ");
W_V(name);
W_L("=\"");
/* CHTML1.0 */
/*----------------------------------------------------------------------*/
value = chxj_encoding_parameter(r, value);
- value = chxj_add_cookie_parameter(r, value, jxhtml->cookie);
W_L(" href=\"");
W_V(value);
W_L("\"");
/*----------------------------------------------------------------------*/
/* CHTML 1.0 */
/*----------------------------------------------------------------------*/
- value = chxj_add_cookie_parameter(r, value, jxhtml->cookie);
W_L(" action=\"");
W_V(value);
W_L("\"");
/*----------------------------------------------------------------------*/
#ifdef IMG_NOT_CONVERT_FILENAME
value = chxj_encoding_parameter(r, value);
- value = chxj_add_cookie_parameter(r, value, jxhtml->cookie);
if (value) {
value = apr_psprintf(r->pool,
"%s%c%s=true",
#else
value = chxj_img_conv(r, spec, value);
value = chxj_encoding_parameter(r, value);
- value = chxj_add_cookie_parameter(r, value, jxhtml->cookie);
if (value) {
value = apr_psprintf(r->pool,
"%s%c%s=true",
case CHXJ_SPEC_Chtml_6_0:
case CHXJ_SPEC_Chtml_7_0:
case CHXJ_SPEC_Jhtml:
- case CHXJ_SPEC_Jxhtml:
cookie = chxj_save_cookie(r);
break;
default:
apr_status_t rv;
apr_bucket *b;
const char *data;
- char *contentLength;
char *user_agent = NULL;
apr_size_t len;
mod_chxj_ctx *ctx = (mod_chxj_ctx *)f->ctx;
case CHXJ_SPEC_Chtml_6_0:
case CHXJ_SPEC_Chtml_7_0:
case CHXJ_SPEC_Jhtml:
- case CHXJ_SPEC_Jxhtml:
chxj_cookie_lock(r);
cookie = chxj_save_cookie(r);
s_add_cookie_id_if_has_location_header(r, cookie);
break;
}
}
+ if (apr_table_get(r->headers_out, "Location") || apr_table_get(r->err_headers_out, "Location")) {
+ if (r->status < HTTP_MULTIPLE_CHOICES || r->status > HTTP_TEMPORARY_REDIRECT) {
+ r->status = HTTP_MOVED_TEMPORARILY;
+ }
+ }
ap_pass_brigade(f->next, bb);
return APR_SUCCESS;
}
}
}
- contentLength = apr_psprintf(pool, "%d", (int)ctx->len);
- apr_table_setn(r->headers_out, "Content-Length", contentLength);
+ apr_table_unset(r->headers_out, "Content-Length");
+ apr_table_unset(r->err_headers_out, "Content-Length");
+ ap_set_content_length(r, (apr_off_t)ctx->len);
+
+ if (apr_table_get(r->headers_out, "Location") || apr_table_get(r->err_headers_out, "Location")) {
+ if (r->status < HTTP_MULTIPLE_CHOICES || r->status > HTTP_TEMPORARY_REDIRECT) {
+ r->status = HTTP_MOVED_TEMPORARILY;
+ }
+ }
if (ctx->len > 0) {
DBG(r, "call pass_data_to_filter()");
case CHXJ_SPEC_Chtml_6_0:
case CHXJ_SPEC_Chtml_7_0:
case CHXJ_SPEC_Jhtml:
- case CHXJ_SPEC_Jxhtml:
chxj_cookie_lock(r);
cookie = chxj_save_cookie(r);
/*
break;
}
}
+ if (apr_table_get(r->headers_out, "Location") || apr_table_get(r->err_headers_out, "Location")) {
+ if (r->status < HTTP_MULTIPLE_CHOICES || r->status > HTTP_TEMPORARY_REDIRECT) {
+ r->status = HTTP_MOVED_TEMPORARILY;
+ }
+ }
apr_table_setn(r->headers_out, "Content-Length", "0");
DBG(r, "call pass_data_to_filter()");
rv = pass_data_to_filter(f, (const char *)"", (apr_size_t)0);
s_add_cookie_id_if_has_location_header(request_rec *r, cookie_t *cookie)
{
char *location_header = (char *)apr_table_get(r->headers_out, "Location");
+ if (! location_header) {
+ location_header = (char *)apr_table_get(r->err_headers_out, "Location");
+ }
if (cookie && location_header) {
DBG(r, "Location Header=[%s]", location_header);
location_header = chxj_add_cookie_parameter(r,
if ((chunked = (char *)apr_table_get(r->headers_out, "Transfer-Encoding")) != NULL) {
if (strcasecmp(chunked, "chunked") == 0) {
r->chunked = 1;
+ apr_table_unset(r->headers_out, "Transfer-Encoding");
}
}
{