diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-06-07 10:39:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 10:39:52 +0200 |
commit | 4136993f4403c80f61aa8802a8ce3d7e892d890a (patch) | |
tree | 356deb8a58b9d8e155d61a6953235cb169245572 /lib | |
parent | 541260521960fb83035fb246affad0dcbce598a0 (diff) | |
parent | 6a6bcdc558ae691b634ca23480562a0b0e45dc78 (diff) | |
download | nextcloud-server-4136993f4403c80f61aa8802a8ce3d7e892d890a.tar.gz nextcloud-server-4136993f4403c80f61aa8802a8ce3d7e892d890a.zip |
Merge pull request #27336 from nextcloud/backport/27329/stable21
[stable21] Propagate throttling on OCS response
Diffstat (limited to 'lib')
-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' |