From 67dd730546618dd99ebd48ebf2f10da493a90756 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 9 Feb 2004 23:27:43 +0000 Subject: Fixed bug #27196 (Missing content_length initialization in apache 2 sapis). --- sapi/apache2filter/sapi_apache2.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sapi/apache2filter') diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 570d012328..22df068626 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -376,6 +376,7 @@ static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC) { char *content_type; + char *content_length; const char *auth; PG(during_request_startup) = 0; @@ -394,6 +395,10 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC) SG(request_info).post_data_length = ctx->post_len; efree(content_type); + + content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length"); + SG(request_info).content_length = (content_length ? atoi(content_length) : 0); + apr_table_unset(f->r->headers_out, "Content-Length"); apr_table_unset(f->r->headers_out, "Last-Modified"); apr_table_unset(f->r->headers_out, "Expires"); -- cgit v1.2.1