]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "Compress the appstore requests by default" 21054/head
authorMorris Jobke <hey@morrisjobke.de>
Wed, 20 May 2020 09:09:46 +0000 (11:09 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 20 May 2020 11:37:28 +0000 (13:37 +0200)
This reverts commit 6ffde128ad17a1ebe38f8d18b21a37d01b47c46b.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/App/AppStore/Fetcher/Fetcher.php
tests/lib/App/AppStore/Fetcher/FetcherBase.php

index c109bacf1358bd962c3aec937ba5f65b1bffde8e..bb39637891f2ca65681a8eb2a398ee0b67ca1f25 100644 (file)
@@ -98,11 +98,12 @@ 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();
index 45f3f22b9d42587752a82f54e5bfd174110c1ef1..2e04f22760e3588746aace5e5b88da383a67ba63 100644 (file)
@@ -249,15 +249,7 @@ abstract class FetcherBase extends TestCase {
                $client
                        ->expects($this->once())
                        ->method('get')
-                       ->with(
-                               $this->equalTo($this->endpoint),
-                               $this->equalTo([
-                                       'timeout' => 10,
-                                       'headers' => [
-                                               'Accept-Encoding' => 'gzip',
-                                       ]
-                               ])
-                       )
+                       ->with($this->endpoint)
                        ->willReturn($response);
                $response
                        ->expects($this->once())
@@ -350,15 +342,7 @@ abstract class FetcherBase extends TestCase {
                $client
                        ->expects($this->once())
                        ->method('get')
-                       ->with(
-                               $this->equalTo($this->endpoint),
-                               $this->equalTo([
-                                       'timeout' => 10,
-                                       'headers' => [
-                                               'Accept-Encoding' => 'gzip',
-                                       ]
-                               ])
-                       )
+                       ->with($this->endpoint)
                        ->willReturn($response);
                $response
                        ->expects($this->once())
@@ -446,15 +430,7 @@ abstract class FetcherBase extends TestCase {
                $client
                        ->expects($this->once())
                        ->method('get')
-                       ->with(
-                               $this->equalTo($this->endpoint),
-                               $this->equalTo([
-                                       'timeout' => 10,
-                                       'headers' => [
-                                               'Accept-Encoding' => 'gzip',
-                                       ]
-                               ])
-                       )
+                       ->with($this->endpoint)
                        ->willReturn($response);
                $response
                        ->expects($this->once())
@@ -519,15 +495,7 @@ abstract class FetcherBase extends TestCase {
                $client
                        ->expects($this->once())
                        ->method('get')
-                       ->with(
-                               $this->equalTo($this->endpoint),
-                               $this->equalTo([
-                                       'timeout' => 10,
-                                       'headers' => [
-                                               'Accept-Encoding' => 'gzip',
-                                       ]
-                               ])
-                       )
+                       ->with($this->endpoint)
                        ->willThrowException(new \Exception());
 
                $this->assertSame([], $this->fetcher->get());
@@ -584,8 +552,7 @@ abstract class FetcherBase extends TestCase {
                                $this->equalTo([
                                        'timeout' => 10,
                                        'headers' => [
-                                               'Accept-Encoding' => 'gzip',
-                                               'If-None-Match' => '"myETag"',
+                                               'If-None-Match' => '"myETag"'
                                        ]
                                ])
                        )->willReturn($response);
@@ -657,7 +624,6 @@ abstract class FetcherBase extends TestCase {
                                $this->equalTo([
                                        'timeout' => 10,
                                        'headers' => [
-                                               'Accept-Encoding' => 'gzip',
                                                'If-None-Match' => '"myETag"',
                                        ]
                                ])
@@ -744,9 +710,6 @@ abstract class FetcherBase extends TestCase {
                                $this->equalTo($this->endpoint),
                                $this->equalTo([
                                        'timeout' => 10,
-                                       'headers' => [
-                                               'Accept-Encoding' => 'gzip',
-                                       ],
                                ])
                        )
                        ->willReturn($response);