Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy over the ETag and LastModified when formatting a Dataresponse
This way the ETag checks etc are all working.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer authored and backportbot[bot] committed May 19, 2020
commit b9cb5a74cc08e63ee7fcb3ca6aafe471f87c1ded
8 changes: 8 additions & 0 deletions lib/public/AppFramework/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ public function __construct($appName,
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);
Expand Down