Update uri.php

This commit is contained in:
Namhyeon Go 2019-10-17 15:54:15 +09:00 committed by GitHub
parent 8198038055
commit 36ce21f0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,9 +94,10 @@ if(!check_function_exists("read_requests")) {
// check if json or serialized request // check if json or serialized request
foreach(getallheaders() as $name=>$value) { foreach(getallheaders() as $name=>$value) {
if($name == "Content-Type") { if($name == "Content-Type") {
if($value == "application/json") { $values = explode(";", $value);
if(in_array("application/json", $values)) {
$options['json'] = true; $options['json'] = true;
} elseif($value == "application/vnd.php.serialized") { } elseif(in_array("application/vnd.php.serialized", $values)) {
$options['serialized'] = true; $options['serialized'] = true;
} }
break; break;