Skip to content

Commit dfc922c

Browse files
committed
Revert "Compress the appstore requests by default"
This reverts commit 6ffde12. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
1 parent 804d9f4 commit dfc922c

2 files changed

Lines changed: 8 additions & 44 deletions

File tree

lib/private/App/AppStore/Fetcher/Fetcher.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ protected function fetch($ETag, $content) {
9898

9999
$options = [
100100
'timeout' => 10,
101-
'headers' => ['Accept-Encoding' => 'gzip'],
102101
];
103102

104103
if ($ETag !== '') {
105-
$options['headers']['If-None-Match'] = $ETag;
104+
$options['headers'] = [
105+
'If-None-Match' => $ETag,
106+
];
106107
}
107108

108109
$client = $this->clientService->newClient();

tests/lib/App/AppStore/Fetcher/FetcherBase.php

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,7 @@ public function testGetWithAlreadyExistingFileAndOutdatedTimestamp() {
249249
$client
250250
->expects($this->once())
251251
->method('get')
252-
->with(
253-
$this->equalTo($this->endpoint),
254-
$this->equalTo([
255-
'timeout' => 10,
256-
'headers' => [
257-
'Accept-Encoding' => 'gzip',
258-
]
259-
])
260-
)
252+
->with($this->endpoint)
261253
->willReturn($response);
262254
$response
263255
->expects($this->once())
@@ -350,15 +342,7 @@ public function testGetWithAlreadyExistingFileAndNoVersion() {
350342
$client
351343
->expects($this->once())
352344
->method('get')
353-
->with(
354-
$this->equalTo($this->endpoint),
355-
$this->equalTo([
356-
'timeout' => 10,
357-
'headers' => [
358-
'Accept-Encoding' => 'gzip',
359-
]
360-
])
361-
)
345+
->with($this->endpoint)
362346
->willReturn($response);
363347
$response
364348
->expects($this->once())
@@ -446,15 +430,7 @@ public function testGetWithAlreadyExistingFileAndOutdatedVersion() {
446430
$client
447431
->expects($this->once())
448432
->method('get')
449-
->with(
450-
$this->equalTo($this->endpoint),
451-
$this->equalTo([
452-
'timeout' => 10,
453-
'headers' => [
454-
'Accept-Encoding' => 'gzip',
455-
]
456-
])
457-
)
433+
->with($this->endpoint)
458434
->willReturn($response);
459435
$response
460436
->expects($this->once())
@@ -519,15 +495,7 @@ public function testGetWithExceptionInClient() {
519495
$client
520496
->expects($this->once())
521497
->method('get')
522-
->with(
523-
$this->equalTo($this->endpoint),
524-
$this->equalTo([
525-
'timeout' => 10,
526-
'headers' => [
527-
'Accept-Encoding' => 'gzip',
528-
]
529-
])
530-
)
498+
->with($this->endpoint)
531499
->willThrowException(new \Exception());
532500

533501
$this->assertSame([], $this->fetcher->get());
@@ -584,8 +552,7 @@ public function testGetMatchingETag() {
584552
$this->equalTo([
585553
'timeout' => 10,
586554
'headers' => [
587-
'Accept-Encoding' => 'gzip',
588-
'If-None-Match' => '"myETag"',
555+
'If-None-Match' => '"myETag"'
589556
]
590557
])
591558
)->willReturn($response);
@@ -657,7 +624,6 @@ public function testGetNoMatchingETag() {
657624
$this->equalTo([
658625
'timeout' => 10,
659626
'headers' => [
660-
'Accept-Encoding' => 'gzip',
661627
'If-None-Match' => '"myETag"',
662628
]
663629
])
@@ -744,9 +710,6 @@ public function testFetchAfterUpgradeNoETag() {
744710
$this->equalTo($this->endpoint),
745711
$this->equalTo([
746712
'timeout' => 10,
747-
'headers' => [
748-
'Accept-Encoding' => 'gzip',
749-
],
750713
])
751714
)
752715
->willReturn($response);

0 commit comments

Comments
 (0)