summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2002-11-08 08:41:52 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2002-11-08 08:41:52 +0000
commit5aec6f4e336ec99a49587494c159459ba31dc67e (patch)
tree7078d460cc59ff3d3d31ba975841308ed4a063a7 /main/SAPI.c
parent72e0aa894aece4d2d68d4e02a25a795e8e69aaae (diff)
downloadphp-git-5aec6f4e336ec99a49587494c159459ba31dc67e.tar.gz
fix for #20198:
"always_populate_raw_post_data = On" breaks HTTP file uploads
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 7d0392465c..b2bb58a288 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -150,15 +150,19 @@ static void sapi_read_post_data(TSRMLS_D)
}
}
+ /* now try to find an appropriate POST content handler */
if (zend_hash_find(&known_post_content_types, content_type, content_type_length+1, (void **) &post_entry)==SUCCESS) {
+ /* found one, register it for use */
SG(request_info).post_entry = post_entry;
post_reader_func = post_entry->post_reader;
} else {
+ /* fallback */
+ SG(request_info).post_entry = NULL;
if (!sapi_module.default_post_reader) {
+ /* no default reader ? */
sapi_module.sapi_error(E_WARNING, "Unsupported content type: '%s'", content_type);
return;
}
- SG(request_info).post_entry = NULL;
}
if (oldchar) {
*(p-1) = oldchar;