Return immediately if JSON

This commit is contained in:
Kijin Sung 2018-03-13 11:08:53 +09:00
parent e63d597168
commit 79120ae5b6

View file

@ -1149,17 +1149,13 @@ class Context
{
if(strpos($header, 'json') !== false)
{
$is_json = true;
break;
self::$_instance->request_method = 'JSON';
return;
}
}
// JSON or XMLRPC
if (isset($is_json))
{
self::$_instance->request_method = 'JSON';
}
elseif ($GLOBALS['HTTP_RAW_POST_DATA'] && !$_POST)
// Check XMLRPC
if ($GLOBALS['HTTP_RAW_POST_DATA'] && !$_POST)
{
self::$_instance->request_method = 'XMLRPC';
}