#3244: Use gzip content encoding only if supported by client
----------------------+------------------------------------
Reporter: tkSimon | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.x
Component: Web UI | Version: other (please specify)
Resolution: | Keywords:
----------------------+------------------------------------
Changes (by Cas):
* component: Unknown => Web UI
* milestone: needs verified => 2.x
Old description:
> At the moment deluge responds to requests for certain resource with gzip
> content encoding regardless of the requests `accept-encoding` header. It
> should only use gzip encoding if supported by the client.
>
> To reproduce, run:
> curl 127.0.0.1:8112/js/ext-extensions.js -o /dev/null -v
>
> The response will have a "Content-Encoding: gzip" header, and it's
> payload will be gzipped even though the request doesn't contain an
> "Accpet-Encoding: gzip" header.
>
> I created a PR to fix this: https://github.com/deluge-
> torrent/deluge/pull/232
New description:
At the moment deluge responds to requests for certain resource with gzip
content encoding regardless of the requests `accept-encoding` header. It
should only use gzip encoding if supported by the client.
Personally, I wanted deluge to respond with uncompressed assets because i
have an nginx reverse proxy in front of deluge that's doing brotli (and
gzip compression,) and caching those. The issue being that nginx only
compresses when the origin (deluge) sends them uncompressed. This is
usually achieved by configuring nginx to not forward the accept-encoding
header.
To reproduce, run:
curl 127.0.0.1:8112/js/ext-extensions.js -o /dev/null -v
The response will have a "Content-Encoding: gzip" header, and it's payload
will be gzipped even though the request doesn't contain an "Accpet-
Encoding: gzip" header.
I created a PR to fix this: https://github.com/deluge-
torrent/deluge/pull/232
--
Comment:
Based on your use-case I agree that this would be good to fix.
Using the Twisted resource wrapper is a better way to do this and I have
created a PR: https://github.com/deluge-torrent/deluge/pull/233
We should also only compress text and not images and that can be included
in the changes.
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3244#comment:1>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.