From: Antony Dovgal Date: Mon, 20 Jun 2005 12:46:52 +0000 (+0000) Subject: MFH: fix #29683 (headers_list() returns empty array) X-Git-Tag: php-5.0.5RC1~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ba14f7c6070ce4fa6ed832deb319111e6a74365;p=php MFH: fix #29683 (headers_list() returns empty array) --- diff --git a/NEWS b/NEWS index aee549593e..63d66b1eb9 100644 --- a/NEWS +++ b/NEWS @@ -156,6 +156,7 @@ PHP NEWS handler). (Tony) - Fixed bug #29971 (variables_order behaviour). (Dmitry) - Fixed bug #29944 (Function defined in switch, crashes). (Dmitry) +- Fixed bug #29683 (headers_list() returns empty array). (Tony) - Fixed bug #29583 (crash when echoing a COM object). (M.Sisolak, Wez) - Fixed bug #29338 (unencoded spaces get ignored after certain tags). (Ilia) - Fixed bug #29210 (Function: is_callable - no support for private and diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index 6eed907128..74707ce7f2 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -199,9 +199,7 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head *p = ':'; /* a well behaved header handler shouldn't change its original arguments */ - efree(sapi_header->header); - - return 0; /* don't use the default SAPI mechanism, Apache duplicates this functionality */ + return SAPI_HEADER_ADD; } /* }}} */ diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index bffacba13b..02615ff8b6 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -128,9 +128,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str else apr_table_add(ctx->r->headers_out, sapi_header->header, val); - sapi_free_header(sapi_header); - - return 0; + return SAPI_HEADER_ADD; } static int diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 785f8647fc..ad4e93bd49 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -112,9 +112,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_stru apr_table_add(ctx->r->headers_out, sapi_header->header, val); } - sapi_free_header(sapi_header); - - return 0; + return SAPI_HEADER_ADD; } static int diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c index 7b916d7e38..9b3d80c4f4 100644 --- a/sapi/apache_hooks/mod_php5.c +++ b/sapi/apache_hooks/mod_php5.c @@ -340,9 +340,7 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head *p = ':'; /* a well behaved header handler shouldn't change its original arguments */ - efree(sapi_header->header); - - return 0; /* don't use the default SAPI mechanism, Apache duplicates this functionality */ + return SAPI_HEADER_ADD; } /* }}} */