Skip to content

Commit 4253473

Browse files
committed
Do not set Accept-Encoding in FeedIo client
1 parent 6278a86 commit 4253473

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/FeedIo/Adapter/Client.php

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ public function getResponse(string $url, DateTime $modifiedSince = null): Respon
4242
*/
4343
protected function request(string $method, string $url, DateTime $modifiedSince = null): ResponseInterface
4444
{
45-
$headers = $this->getHeaders($modifiedSince);
45+
$headers = [];
46+
47+
if ($modifiedSince) {
48+
$headers['If-Modified-Since'] = $modifiedSince->format(DateTime::RFC2822);
49+
}
50+
4651
$request = new Request($method, $url, $headers);
4752

4853
$timeStart = microtime(true);
@@ -60,20 +65,4 @@ protected function request(string $method, string $url, DateTime $modifiedSince
6065
}
6166
}
6267

63-
/**
64-
* @param DateTime|null $modifiedSince
65-
* @return array
66-
*/
67-
protected function getHeaders(DateTime $modifiedSince = null): array
68-
{
69-
$headers = [
70-
'Accept-Encoding' => 'gzip, deflate',
71-
];
72-
73-
if ($modifiedSince) {
74-
$headers['If-Modified-Since'] = $modifiedSince->format(\DateTime::RFC2822);
75-
}
76-
77-
return $headers;
78-
}
7968
}

0 commit comments

Comments
 (0)