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:
authorMorris Jobke <hey@morrisjobke.de>2020-05-20 00:04:51 +0300
committerMorris Jobke <hey@morrisjobke.de>2020-05-20 10:51:07 +0300
commit6ffde128ad17a1ebe38f8d18b21a37d01b47c46b (patch)
tree5fd3ef25fcbffa5d1011b2e6d38f5c5e56cfdd86 /lib
parent3e0d8df0364bfb9da5d36e714e3de1c56f02dcd4 (diff)
Compress the appstore requests by default
In test it reduced the transfered data from 5 MB to 2 MB. This should reduce the load on the appstore significantly. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index bb39637891f..c109bacf135 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -98,12 +98,11 @@ abstract class Fetcher {
$options = [
'timeout' => 10,
+ 'headers' => ['Accept-Encoding' => 'gzip'],
];
if ($ETag !== '') {
- $options['headers'] = [
- 'If-None-Match' => $ETag,
- ];
+ $options['headers']['If-None-Match'] = $ETag;
}
$client = $this->clientService->newClient();