v2
v2 copied to clipboard
Add Brotli decompression to Http Client
Some feeds are serving Brotli-encoded responses even when the client is not declaring such capability.
This issue was manifesting itself as Unsupported feed format
on feed pages.
This PR adds the ability to decode Brotli responses, given that the Content-Encoding
header is set to br
(brotli).
I have picked what looks like the most up-to-date and maintained brotli library in the golang ecosystem.
Some feeds are serving Brotli-encoded responses even when the client is not declaring such capability.
Can you provide an example of such website?
@razielgn Are you still interested by this PR? I haven't seen any feed with that problem in the wild. Do you have any examples?
Didn't Google create brotli? Does go support require a third-party dependency, it's not on the standard lib?
My main concern with this change is another dependency has to be added to handle the Brotli compression. That seems to be a workaround for an incorrectly configured web server.
We can reconsider this if the problem is more widespread, in the meantime I will close this PR. The author didn't replied, so I don't think it's a major blocker for now.
@fguillot I'd still recommend considering Brotli support. Popular sites may get hundreds or even thousands of hits from Miniflux per day, so small savings (like Brotli support) can add up fast for a feed provider. And users with hundreds (or thousands!) of feeds could enjoy faster refreshes.
New PR #2612