Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Controller.php')
-rw-r--r--lib/public/AppFramework/Controller.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php
index ca35d723242..db1f95634e0 100644
--- a/lib/public/AppFramework/Controller.php
+++ b/lib/public/AppFramework/Controller.php
@@ -91,6 +91,14 @@ abstract class Controller {
unset($headers['Content-Type']);
}
$response->setHeaders(array_merge($dataHeaders, $headers));
+
+ if ($data->getETag() !== null) {
+ $response->setETag($data->getETag());
+ }
+ if ($data->getLastModified() !== null) {
+ $response->setLastModified($data->getLastModified());
+ }
+
return $response;
}
return new JSONResponse($data);