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 // check if json request
foreach(getallheaders() as $name=>$value) { foreach(getallheaders() as $name=>$value) {
if($name == "Accept") { if($name == "Content-Type") {
$accepts = explode(',', $value); if($value == "application/json") {
if(in_array("application/json", $accepts)) {
$options['json'] = true; $options['json'] = true;
} elseif(in_array("application/vnd.php.serialized", $accepts)) { } elseif($value == "application/vnd.php.serialized") {
$options['serialized'] = true; $options['serialized'] = true;
} }
break; break;