diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-05-07 23:27:59 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-05-07 23:27:59 +0000 |
commit | 420352d8b5320730689ac3f3772c372c78af3a74 (patch) | |
tree | 8015701520498a9ce3f4b657cc1bbb21cf94a5ce /main | |
parent | c25a2f6cd2811fb1503900af8db875b3e4d82e11 (diff) | |
download | php-git-420352d8b5320730689ac3f3772c372c78af3a74.tar.gz |
Register RAW_POST_DATA even when always_populate_raw_post_data is off in
instances where content type is not known
Diffstat (limited to 'main')
-rw-r--r-- | main/php_content_types.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/php_content_types.c b/main/php_content_types.c index fcd431d7ce..8dc55f89d7 100644 --- a/main/php_content_types.c +++ b/main/php_content_types.c @@ -47,7 +47,9 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader) 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); |