Update uri.php

This commit is contained in:
Namhyeon Go 2019-01-01 15:13:19 +09:00 committed by GitHub
parent af219011bb
commit 50bad9debc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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