[Deluge] #3244: Use gzip content encoding only if supported by client

2 views
Skip to first unread message

Deluge

unread,
Mar 26, 2019, 7:04:33 PM3/26/19
to delug...@googlegroups.com
#3244: Use gzip content encoding only if supported by client
---------------------+------------------------------------
Reporter: tkSimon | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: other (please specify)
Keywords: |
---------------------+------------------------------------
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

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3244>
Deluge <http://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Apr 1, 2019, 7:33:24 AM4/1/19
to delug...@googlegroups.com
#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

unread,
May 9, 2019, 7:06:03 AM5/9/19
to delug...@googlegroups.com
#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:
----------------------+------------------------------------

Comment (by Cas):

Fixed in develop: [db021b9f415]

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3244#comment:2>

Deluge

unread,
May 9, 2019, 7:06:11 AM5/9/19
to delug...@googlegroups.com
#3244: Use gzip content encoding only if supported by client
----------------------+------------------------------------
Reporter: tkSimon | Owner:
Type: bug | Status: closed

Priority: minor | Milestone: 2.x
Component: Web UI | Version: other (please specify)
Resolution: Fixed | Keywords:
----------------------+------------------------------------
Changes (by Cas):

* status: new => closed
* resolution: => Fixed


--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3244#comment:3>

Reply all
Reply to author
Forward
0 new messages