diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-06-01 14:15:23 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2021-06-01 14:15:23 +0200 |
commit | 09abcfadfa8cb0a12d22dc730950dbfc9d896656 (patch) | |
tree | 1a2315e4b18213b286568834d602c3a09db44c18 /lib/private/AppFramework | |
parent | 94f475686c2159bd06cccc41d6bd71d8cbf863a2 (diff) | |
download | nextcloud-server-09abcfadfa8cb0a12d22dc730950dbfc9d896656.tar.gz nextcloud-server-09abcfadfa8cb0a12d22dc730950dbfc9d896656.zip |
Propagate throttling on OCS response
The BaseResponse converter did not take over any throttling state from the DataResponse.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r-- | lib/private/AppFramework/OCS/BaseResponse.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php index 55410c8910b..d6e3d515f86 100644 --- a/lib/private/AppFramework/OCS/BaseResponse.php +++ b/lib/private/AppFramework/OCS/BaseResponse.php @@ -75,6 +75,11 @@ abstract class BaseResponse extends Response { $this->setLastModified($dataResponse->getLastModified()); $this->setCookies($dataResponse->getCookies()); + if ($dataResponse->isThrottled()) { + $throttleMetadata = $dataResponse->getThrottleMetadata(); + $this->throttle($throttleMetadata); + } + if ($format === 'json') { $this->addHeader( 'Content-Type', 'application/json; charset=utf-8' |