summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2010-02-05 18:59:05 (GMT)
committerRasmus Lerdorf <rasmus@php.net>2010-02-05 18:59:05 (GMT)
commit1947334023c101fb1ad455dd0e18d44dd5a2ec94 (patch)
treee5c2e81746cfcb2c3328a2000f954809a2f6cfd9 /sapi
parent3a239b15e94cdec8b2205e0d1f3d3cc9032db457 (diff)
downloadphp-1947334023c101fb1ad455dd0e18d44dd5a2ec94.tar.gz
Fix bug #50940
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/mod_php5.c2
-rw-r--r--sapi/apache2filter/sapi_apache2.c2
-rw-r--r--sapi/apache2handler/sapi_apache2.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index c980597..9711e3f 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -196,6 +196,8 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head
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 (op == SAPI_HEADER_REPLACE) {
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 219ae15..c9719b5 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -127,6 +127,8 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_e
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 (op == SAPI_HEADER_REPLACE)
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
else
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index ff63c72..386bef0 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -119,6 +119,8 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_e
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 (op == SAPI_HEADER_REPLACE) {
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
} else {