cvs: php4 /main SAPI.c main.c php_content_types.c php_globals.h

From: Date: Tue, 17 Jul 2001 16:46:07 +0000
Subject: cvs: php4 /main SAPI.c main.c php_content_types.c php_globals.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6249@lists.php.net to get a copy of this message
rasmus Tue Jul 17 12:46:07 2001 EDT Modified files: /php4/main SAPI.c main.c php_content_types.c php_globals.h Log: Add always_populate_raw_post_data ini directive and default it to 0 to maintain current behaviour. If this is turned on then $HTTP_RAW_POST_DATA is always populated with a copy of the raw post data. @ - Add config option (always_populate_raw_post_data) which when enabled @ will always populate $HTTP_RAW_POST_DATA regardless of the post mime @ type (Rasmus) Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.106 php4/main/SAPI.c:1.107 --- php4/main/SAPI.c:1.106 Wed Jun 6 09:05:53 2001 +++ php4/main/SAPI.c Tue Jul 17 12:46:06 2001 @@ -125,6 +125,7 @@ char *p; char oldchar=0; void (*post_reader_func)(SLS_D); + PLS_FETCH(); /* dedicated implementation for increased performance: @@ -162,6 +163,9 @@ } post_reader_func(SLS_C); SG(request_info).content_type_dup = content_type; + if(PG(always_populate_raw_post_data) && sapi_module.default_post_reader) { + sapi_module.default_post_reader(SLS_C); + } } Index: php4/main/main.c diff -u php4/main/main.c:1.379 php4/main/main.c:1.380 --- php4/main/main.c:1.379 Sun Jul 15 15:14:25 2001 +++ php4/main/main.c Tue Jul 17 12:46:06 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.379 2001/07/15 19:14:25 zeev Exp $ */ +/* $Id: main.c,v 1.380 2001/07/17 16:46:06 rasmus Exp $ */ /* {{{ includes */ @@ -259,6 +259,7 @@ PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL) STD_PHP_INI_ENTRY("allow_url_fopen", "1", PHP_INI_ALL, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("always_populate_raw_post_data", "0", PHP_INI_ALL, OnUpdateBool, always_populate_raw_post_data, php_core_globals, core_globals) PHP_INI_END() /* }}} */ Index: php4/main/php_content_types.c diff -u php4/main/php_content_types.c:1.11 php4/main/php_content_types.c:1.12 --- php4/main/php_content_types.c:1.11 Wed Jun 6 09:05:53 2001 +++ php4/main/php_content_types.c Tue Jul 17 12:46:06 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_content_types.c,v 1.11 2001/06/06 13:05:53 rasmus Exp $ */ +/* $Id: php_content_types.c,v 1.12 2001/07/17 16:46:06 rasmus Exp $ */ #include "php.h" #include "SAPI.h" @@ -40,7 +40,7 @@ char *data; ELS_FETCH(); - sapi_read_standard_form_data(SLS_C); + if(!SG(request_info).post_data) sapi_read_standard_form_data(SLS_C); data = estrndup(SG(request_info).post_data,SG(request_info).post_data_length); SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, SG(request_info).post_data_length); } Index: php4/main/php_globals.h diff -u php4/main/php_globals.h:1.67 php4/main/php_globals.h:1.68 --- php4/main/php_globals.h:1.67 Fri Jul 13 14:21:21 2001 +++ php4/main/php_globals.h Tue Jul 17 12:46:07 2001 @@ -136,6 +136,8 @@ zend_bool during_request_startup; zend_bool allow_url_fopen; + + zend_bool always_populate_raw_post_data; };

« previous php.cvs (#6249) next »