diff options
Diffstat (limited to 'lib/private/appframework/http/dispatcher.php')
-rw-r--r-- | lib/private/appframework/http/dispatcher.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/appframework/http/dispatcher.php b/lib/private/appframework/http/dispatcher.php index 7f2717951a5..29a661d5743 100644 --- a/lib/private/appframework/http/dispatcher.php +++ b/lib/private/appframework/http/dispatcher.php @@ -30,6 +30,7 @@ use \OC\AppFramework\Utility\ControllerMethodReflector; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; @@ -154,8 +155,8 @@ class Dispatcher { $response = call_user_func_array(array($controller, $methodName), $arguments); - // format response if not of type response - if(!($response instanceof Response)) { + // format response + if($response instanceof DataResponse || !($response instanceof Response)) { // get format from the url format or request format parameter $format = $this->request->getParam('format'); |