cvs: php-src(PHP_5_2) /main php_content_types.c /tests/basic 026.phpt

From: Date: Mon, 07 May 2007 23:27:59 +0000
Subject: cvs: php-src(PHP_5_2) /main php_content_types.c /tests/basic 026.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44227@lists.php.net to get a copy of this message
iliaa Mon May 7 23:27:59 2007 UTC Added files: (Branch: PHP_5_2) /php-src/tests/basic 026.phpt Modified files: /php-src/main php_content_types.c Log: Register RAW_POST_DATA even when always_populate_raw_post_data is off in instances where content type is not known http://cvs.php.net/viewvc.cgi/php-src/main/php_content_types.c?r1=1.32.2.1.2.3&r2=1.32.2.1.2.4&diff_format=u Index: php-src/main/php_content_types.c diff -u php-src/main/php_content_types.c:1.32.2.1.2.3 php-src/main/php_content_types.c:1.32.2.1.2.4 --- php-src/main/php_content_types.c:1.32.2.1.2.3 Sun May 6 16:34:14 2007 +++ php-src/main/php_content_types.c Mon May 7 23:27:59 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_content_types.c,v 1.32.2.1.2.3 2007/05/06 16:34:14 iliaa Exp $ */ +/* $Id: php_content_types.c,v 1.32.2.1.2.4 2007/05/07 23:27:59 iliaa Exp $ */ #include "php.h" #include "SAPI.h" @@ -47,7 +47,9 @@ sapi_read_standard_form_data(TSRMLS_C); } - if (PG(always_populate_raw_post_data) && SG(request_info).post_data) { + /* For unknown content types we create HTTP_RAW_POST_DATA even if always_populate_raw_post_data off, + * this is in-effecient, but we need to keep doing it for BC reasons (for now) */ + if ((PG(always_populate_raw_post_data) || NULL == SG(request_info).post_entry) && SG(request_info).post_data) { length = SG(request_info).post_data_length; data = estrndup(SG(request_info).post_data, length); SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, length); http://cvs.php.net/viewvc.cgi/php-src/tests/basic/026.phpt?view=markup&rev=1.1 Index: php-src/tests/basic/026.phpt +++ php-src/tests/basic/026.phpt

« previous php.cvs (#44227) next »