Check an use available compression types of curl
use compression when downloading feed logo
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
As long as we use Feed-io < 6, we always use Guzzle (with Feed-io 6, we
need to choose a [HTTPlug](https://httplug.io/) library ourselves). Guzzle
[supports](https://docs.guzzlephp.org/en/stable/request-options.html#decode-content)
transparently decompressing gzip or deflate compressed responses, which is enabled by default.
Feed-io does this [by default](ffef9eaabe),
but as we override the headers, we have to add a fitting `Accept-Encoding` header as well.
Previously, my feed collection caused up to 45.9 MB download traffic per cronjob,
with this commit it is as low as 23.6 MB.
Signed-off-by: Mynacol <Mynacol@users.noreply.github.com>
* Add the 'Accept' header to the request
Some firewalls block requests without the Accept header on the HTTP(s) request as seen on issue #517,
so, just add the header to all requests and say we accept anything.
Signed-off-by: Carlos Mogas da Silva <r3pek@r3pek.org>
* Use a more detailed Accept Header
Signed-off-by: Carlos Mogas da Silva <r3pek@r3pek.org>
* Split up long line
Signed-off-by: Carlos Mogas da Silva <r3pek@r3pek.org>