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-19.23:14:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497914052.88.0.84047844901.issue30576@psf.upfronthosting.co.za>
In-reply-to
Content
@martin sez:
It may be reasonable to serve the Content-Encoding field based on the stored file though. If the client requests file “xyz”, there should be no encoding, but if the request was explicitly for “xyz.gz”, the server could add Content-Encoding. But I suspect this won’t help Pierre.

I think this suggestion violates the mapping between file name and expected data type: if the request is for "xyz.gz" then the requester wants the compressed form of the file "xyz", but adding the Content-Encoding header would cause (most known) browsers to decode the file in the network stack, and the resulting file displayed or saved would be the uncompressed form, with the compressed name.

While my implementation of the compression technique I outlined is, in fact, in a higher-level server which runs on top of either http.server or Apache, my perception of having to implement it at that level was that this is the sort of thing that the low-level server should be capable of, via configuration settings.

I note that for Apache, both mod_deflate and mod_brotli support either on-the-fly or pre-compressed data files, so it would appear that the authors of those modules agree with my perception that this should be a low-level server configuration thing.

Your example of a /tmp server, Martin, serves to point out the benefits of having pre-compressed files... much less storage is required.  I haven't looked at the pull request in detail: I'm not particularly interested in on-the-fly compression, but I wasn't certain until Pierre responded exactly what he was proposing.
History
Date User Action Args
2017-06-19 23:14:12v+pythonsetrecipients: + v+python, quentel, martin.panter
2017-06-19 23:14:12v+pythonsetmessageid: <1497914052.88.0.84047844901.issue30576@psf.upfronthosting.co.za>
2017-06-19 23:14:12v+pythonlinkissue30576 messages
2017-06-19 23:14:12v+pythoncreate