Improve backward compatibility with AXUpload5 and other third-party AJAX apps

This commit is contained in:
Kijin Sung 2016-01-26 10:32:59 +09:00
parent 8ee5e8c4b0
commit 3a419d586d
5 changed files with 33 additions and 15 deletions

View file

@ -91,7 +91,10 @@ class DisplayHandler extends Handler
{
if(Context::getResponseMethod() == 'JSON' || Context::getResponseMethod() == 'JS_CALLBACK')
{
self::_printJSONHeader();
if(strpos($_SERVER['HTTP_ACCEPT'], 'json') !== false)
{
self::_printJSONHeader();
}
}
else if(Context::getResponseMethod() != 'HTML')
{