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
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2021-06-01 15:15:23 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-06-01 22:46:43 +0300
commit1292bd90c980fc77d72969738db8ed295896aae3 (patch)
treeafac22a9af31c609fa9ea53026e0bda61628c237 /lib
parent20093ee8a0f44a32a795a9451ac30f77f1be12fc (diff)
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')
-rw-r--r--lib/private/AppFramework/OCS/BaseResponse.php5
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'