v2 icon indicating copy to clipboard operation
v2 copied to clipboard

Add Brotli decompression to Http Client

Open razielgn opened this issue 2 years ago • 3 comments

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.

razielgn avatar Mar 24 '22 17:03 razielgn

Some feeds are serving Brotli-encoded responses even when the client is not declaring such capability.

Can you provide an example of such website?

fguillot avatar Mar 25 '22 04:03 fguillot

@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?

fguillot avatar Jul 11 '22 00:07 fguillot

Didn't Google create brotli? Does go support require a third-party dependency, it's not on the standard lib?

somini avatar Aug 28 '22 00:08 somini

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 avatar Oct 30 '22 18:10 fguillot

@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.

Seirdy avatar Aug 21 '23 02:08 Seirdy

New PR #2612

fguillot avatar Apr 19 '24 04:04 fguillot