diff options
author | Joas Schilling <coding@schilljs.com> | 2022-04-21 17:32:30 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-04-21 17:32:30 +0300 |
commit | 5cd31f3faa919cade63f632ed55a96809ec8b45d (patch) | |
tree | 1d86c92c142c894d3fe15b2a5d52737aa6c390be /lib/Controller/ChatController.php | |
parent | 5b0e1f50f0bd2e0200b51abe078f2effe4f58b6d (diff) |
Only set header when the value changed and the status is not 304
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/ChatController.php')
-rw-r--r-- | lib/Controller/ChatController.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php index 1d490d485..932c6c5ef 100644 --- a/lib/Controller/ChatController.php +++ b/lib/Controller/ChatController.php @@ -423,8 +423,8 @@ class ChatController extends AEnvironmentAwareController { // As per "section 10.3.5 of RFC 2616" entity headers shall be // stripped out on 304: https://stackoverflow.com/a/17822709 $response->setStatus(Http::STATUS_OK); + $response->addHeader('X-Chat-Last-Common-Read', $newLastCommonRead); } - $response->addHeader('X-Chat-Last-Common-Read', $newLastCommonRead); } return $response; } |