- Fixed a possible open_basedir/safe_mode bypass in session extension
identified by Grzegorz Stachowiak. (Ilia)
+- Fixed bug #50940 Custom content-length set incorrectly in Apache sapis.
+ (Brian France, Rasmus)
- Fixed bug #50847 (strip_tags() removes all tags greater then 1023 bytes
long). (Ilia)
- Fixed bug #50727 (Accessing mysqli->affected_rows on no connection causes
if (!strcasecmp(header_name, "Content-Type")) {
r->content_type = pstrdup(r->pool, header_content);
+ } else if (!strcasecmp(header_name, "Content-Length")) {
+ ap_set_content_length(r, strtol(header_content, (char **)NULL, 10));
} else if (!strcasecmp(header_name, "Set-Cookie")) {
table_add(r->headers_out, header_name, header_content);
} else if (sapi_header->replace) {
if (!strcasecmp(sapi_header->header, "content-type"))
ctx->r->content_type = apr_pstrdup(ctx->r->pool, val);
+ else if (!strcasecmp(sapi_header->header, "content-length"))
+ ap_set_content_length(ctx->r, strtol(val, (char **)NULL, 10));
else if (sapi_header->replace)
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
else
efree(ctx->content_type);
}
ctx->content_type = estrdup(val);
+ } else if (!strcasecmp(sapi_header->header, "content-length")) {
+ ap_set_content_length(ctx->r, strtol(val, (char **)NULL, 10));
} else if (sapi_header->replace) {
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
} else {