This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author v+python
Recipients martin.panter, quentel, v+python
Date 2017-06-09.19:01:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497034869.51.0.0297255665478.issue30576@psf.upfronthosting.co.za>
In-reply-to
Content
I don't understand fully what you are planning here: to pre-compress the files, or to compress on the fly as mentioned by another commenter?

I've implemented, in a CGI behind http.server, both .gz and .br (gzip and brotli) compression, following these rules:

User requests file  xyz

If xyz doesn't exist, then look for xyz.gz or xyz.br.  If one of them exists, then serve it. But if the browser doesn't support gzip or br (as appropriate) then decompress on the fly, otherwise set the appropriate Content-Encoding, and send the compressed file.

This has worked out well. Of course, .br is only supported for https: transfers.  Most browsers support it now, except Apple.
History
Date User Action Args
2017-06-09 19:01:09v+pythonsetrecipients: + v+python, quentel, martin.panter
2017-06-09 19:01:09v+pythonsetmessageid: <1497034869.51.0.0297255665478.issue30576@psf.upfronthosting.co.za>
2017-06-09 19:01:09v+pythonlinkissue30576 messages
2017-06-09 19:01:09v+pythoncreate