From 6ffde128ad17a1ebe38f8d18b21a37d01b47c46b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 19 May 2020 23:04:51 +0200 Subject: 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 --- lib/private/App/AppStore/Fetcher/Fetcher.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') 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(); -- cgit v1.2.3