diff options
Diffstat (limited to 'lib/private/appframework/app.php')
-rw-r--r-- | lib/private/appframework/app.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/appframework/app.php b/lib/private/appframework/app.php index baf52d02054..074b6cc3fd2 100644 --- a/lib/private/appframework/app.php +++ b/lib/private/appframework/app.php @@ -53,7 +53,7 @@ class App { // initialize the dispatcher and run all the middleware before the controller $dispatcher = $container['Dispatcher']; - list($httpHeaders, $responseHeaders, $output) = + list($httpHeaders, $responseHeaders, $responseCookies, $output) = $dispatcher->dispatch($controller, $methodName); if(!is_null($httpHeaders)) { @@ -64,6 +64,14 @@ class App { header($name . ': ' . $value); } + foreach($responseCookies as $name => $value) { + $expireDate = null; + if($value['expireDate'] instanceof \DateTime) { + $expireDate = $value['expireDate']->getTimestamp(); + } + setcookie($name, $value['value'], $expireDate, \OC::$WEBROOT, null, \OC::$server->getConfig()->getSystemValue('forcessl', false), true); + } + if(!is_null($output)) { header('Content-Length: ' . strlen($output)); print($output); |