Theo de Raadt(dera...@openbsd.org) on 2021.11.04 08:53:13 -0600:
> Stuart Henderson <s...@spacehopper.org> wrote:
> 
> > In some ways it would be better if it *did* compress on the fly, as then
> > you don't have so much to consider with the effect on block/match rules,
> > whether a request is passed to a fastcgi handler, etc. (But of course
> > then you have CPU use issues).
> 
> I don't want my webservers to perform unexpected compute.  Sending extra
> packets is cheaper than doing the compute. 

Exactly.

Other webservers can do this too. In apache you do it with rewrite rules, in
nginx there is the gzip_static option.

As to your question:

> Where you request one filename, and it gives you another?

With most web applications it is common that paths are rewritten. You dont
get the file at the path you request.
 
> > Not sure if it's still actually needed, but most web servers with gzip
> > support usually have a way to disable it per user-agent due to problems
> > that have occurred.

This was needed for old internet explorer version and when i was still in
this business, we stopped using such configuration about 6 years ago. I
don't think we have to care about that anymore.

All currently used browsers support compression _when they ask for it_

> I was not talking about other webservers.  I was talking about any other
> program going, "OH i see you have a .gz file, I cannot actually confirm it
> is a gzip of the non-gzip file, but here you go, here is the thing you
> didn't ask for".

Changing the content of what is served by a webserver depending not only on
the path but also on other headers (such as Accept-Language etc) has been a
feature of HTTP for ages.

Its the job of the administrator setting things up to make sure that the
content served is correct. I don't see a problem with that: the admin needs
to make sure that the correct files are in a directory, independent of what
type of file they are.

However, i think the feature needs to be optional, on a per directory basis.

If the patch is extended to be setable per directory, i'm willing to review
it further.

Reply via email to