diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-06-01 21:40:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 21:40:41 +0200 |
commit | 5438e002761f91d4da5801b670264f2801a41763 (patch) | |
tree | ab5d78eb2e1d229d9cf8cae4fc6600bed9e52ecb /lib/private | |
parent | f4e49b5623c0672d385f6531624e27d6486f91f8 (diff) | |
parent | 09abcfadfa8cb0a12d22dc730950dbfc9d896656 (diff) | |
download | nextcloud-server-5438e002761f91d4da5801b670264f2801a41763.tar.gz nextcloud-server-5438e002761f91d4da5801b670264f2801a41763.zip |
Merge pull request #27329 from nextcloud/propagate-throttle-state-for-baseresponse
Propagate throttling on OCS response
Diffstat (limited to 'lib/private')
-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' |