summaryrefslogtreecommitdiff
path: root/main/php_content_types.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-05-07 23:27:59 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-05-07 23:27:59 +0000
commit420352d8b5320730689ac3f3772c372c78af3a74 (patch)
tree8015701520498a9ce3f4b657cc1bbb21cf94a5ce /main/php_content_types.c
parentc25a2f6cd2811fb1503900af8db875b3e4d82e11 (diff)
downloadphp-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/php_content_types.c')
-rw-r--r--main/php_content_types.c4
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);