Merge pull request #27338 from nextcloud/backport/27329/stable19

[stable19] Propagate throttling on OCS response
This commit is contained in:
Morris Jobke 2021-06-07 10:39:07 +02:00 committed by GitHub
commit a7fd0fc951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'