Skip to content

Commit 5438e00

Browse files
authored
Merge pull request #27329 from nextcloud/propagate-throttle-state-for-baseresponse
Propagate throttling on OCS response
2 parents f4e49b5 + 09abcfa commit 5438e00

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/private/AppFramework/OCS/BaseResponse.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ public function __construct(DataResponse $dataResponse,
7575
$this->setLastModified($dataResponse->getLastModified());
7676
$this->setCookies($dataResponse->getCookies());
7777

78+
if ($dataResponse->isThrottled()) {
79+
$throttleMetadata = $dataResponse->getThrottleMetadata();
80+
$this->throttle($throttleMetadata);
81+
}
82+
7883
if ($format === 'json') {
7984
$this->addHeader(
8085
'Content-Type', 'application/json; charset=utf-8'

0 commit comments

Comments
 (0)