summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/http/dispatcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/appframework/http/dispatcher.php')
-rw-r--r--lib/private/appframework/http/dispatcher.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/appframework/http/dispatcher.php b/lib/private/appframework/http/dispatcher.php
index 24540ef3c94..910e9c32ed4 100644
--- a/lib/private/appframework/http/dispatcher.php
+++ b/lib/private/appframework/http/dispatcher.php
@@ -100,17 +100,15 @@ class Dispatcher {
$response = $this->middlewareDispatcher->afterController(
$controller, $methodName, $response);
- // get the output which should be printed and run the after output
- // middleware to modify the response
- $output = $response->render();
- $out[3] = $this->middlewareDispatcher->beforeOutput(
- $controller, $methodName, $output);
-
// depending on the cache object the headers need to be changed
$out[0] = $this->protocol->getStatusHeader($response->getStatus(),
$response->getLastModified(), $response->getETag());
$out[1] = array_merge($response->getHeaders());
$out[2] = $response->getCookies();
+ $out[3] = $this->middlewareDispatcher->beforeOutput(
+ $controller, $methodName, $response->render()
+ );
+ $out[4] = $response;
return $out;
}