Re: [patch] httpd static gzip compression

2022-02-28 Thread Steffen Nurpmeso
j...@bitminer.ca wrote in <07cf90c2d8adab83ffd36ef69ebcd...@bitminer.ca>: |On 2022-02-27 19:28, Solène wrote: |> If I remember well, lighttpd will compress server side upon request if |> a compressed version of that file doesn't exist. |> |> This is entirely different than how httpd behave,

Re: [patch] httpd static gzip compression

2022-02-27 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220227225619.pzahj%stef...@sdaoden.eu>: |Solène wrote in | <3311e74f-1ad8-49b3-96d7-3f3c7f2af...@perso.pw>: ||27 févr. 2022 19:37:20 j...@bitminer.ca: || ||> Would it be too much to ask to defend the (poor) web master against ||> own-goal errors? ||> ||> That

Re: [patch] httpd static gzip compression

2022-02-27 Thread Steffen Nurpmeso
Solène wrote in <3311e74f-1ad8-49b3-96d7-3f3c7f2af...@perso.pw>: |27 févr. 2022 19:37:20 j...@bitminer.ca: | |> Would it be too much to ask to defend the (poor) web master against |> own-goal errors? |> |> That is, approximately: |> |> if ((access(gzpath, R_OK) == 0) && |>

Re: [patch] httpd static gzip compression

2022-02-26 Thread Tracey Emery
On Sat, Feb 26, 2022 at 10:55:59AM +0100, prx wrote: > First, thank you for your interest! > > > > Shouldn't we check for truncation on strlcpy and strlcat and goto fail > > > in that event? > > > > With goto abort we get an 500 internal server error. > > > > Moreover, if the strlcpy and strlca

Re: [patch] httpd static gzip compression

2022-02-26 Thread Tracey Emery
On Sat, Feb 26, 2022 at 02:52:03AM +0100, Alexander Bluhm wrote: > > Shouldn't we check for truncation on strlcpy and strlcat and goto fail > > in that event? > > With goto abort we get an 500 internal server error. ok > > Index: httpd.conf.5 > ==

Re: [patch] httpd static gzip compression

2022-02-26 Thread prx
First, thank you for your interest! > > Shouldn't we check for truncation on strlcpy and strlcat and goto fail > > in that event? > > With goto abort we get an 500 internal server error. > Moreover, if the strlcpy and strlcat failed, then the file requested (gpath) is obviously not found, and

Re: [patch] httpd static gzip compression

2022-02-25 Thread Alexander Bluhm
> Shouldn't we check for truncation on strlcpy and strlcat and goto fail > in that event? With goto abort we get an 500 internal server error. Index: httpd.conf.5 === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/httpd/httpd.conf.5

Re: [patch] httpd static gzip compression

2022-02-25 Thread Tracey Emery
On Fri, Feb 25, 2022 at 07:47:38PM +0100, Alexander Bluhm wrote: > On Fri, Feb 25, 2022 at 11:00:22AM +0100, prx wrote: > > After a few months, I reupload the patch to enable httpd static > > compression using "location {}" instructions. > > > > I use it without any issue on my own website and to

Re: [patch] httpd static gzip compression

2022-02-25 Thread Alexander Bluhm
On Fri, Feb 25, 2022 at 11:00:22AM +0100, prx wrote: > After a few months, I reupload the patch to enable httpd static > compression using "location {}" instructions. > > I use it without any issue on my own website and to serve > https://webzine.pufy.cafe. > Anyone else tried it? I just added

Re: [patch] httpd static gzip compression

2022-02-25 Thread prx
Hello, After a few months, I reupload the patch to enable httpd static compression using "location {}" instructions. I use it without any issue on my own website and to serve https://webzine.pufy.cafe. Anyone else tried it? I emphasize on the fact it is admin responsibility to enable or not t

Re: [patch] httpd static gzip compression

2021-11-05 Thread Steffen Nurpmeso
... |You would be asking for | |https://exmaple.com/whatever/ls.1 | |and with Accept-Encoding: gzip in the http header, and the |webserver would then look if it has a file | |/whatever/ls.1.gz | |(instead of without .gz) in its document tree and send you that, with |"Content-Encoding:

Re: [patch] httpd static gzip compression

2021-11-05 Thread Crystal Kolipe
On Fri, Nov 05, 2021 at 08:24:21AM -0600, Theo de Raadt wrote: > prx wrote: > > > I think this remark should be placed into perspective. > > > > When a file is requested, its gzipped version is send if : > > * The client ask for it with appropriate header. > > * The server admin configured http

Re: [patch] httpd static gzip compression

2021-11-05 Thread Sebastian Benoit
Theo de Raadt(dera...@openbsd.org) on 2021.11.05 08:24:21 -0600: > prx wrote: > > > I think this remark should be placed into perspective. > > > > When a file is requested, its gzipped version is send if : > > * The client ask for it with appropriate header. > > * The server admin configured ht

Re: [patch] httpd static gzip compression

2021-11-05 Thread Sebastian Benoit
Ingo Schwarze(schwa...@usta.de) on 2021.11.05 14:37:15 +0100: > Hi Theo, > > Theo de Raadt wrote on Thu, Nov 04, 2021 at 08:27:47AM -0600: > > prx wrote: > >> On 2021/11/04 14:21, prx wrote: > > >>> The attached patch add support for static gzip compression. > >>> > >>> In other words, if a cli

Re: [patch] httpd static gzip compression

2021-11-05 Thread Theo de Raadt
prx wrote: > I think this remark should be placed into perspective. > > When a file is requested, its gzipped version is send if : > * The client ask for it with appropriate header. > * The server admin configured httpd to do so **and** compressed files. and if the gzipd file does not contain

Re: [patch] httpd static gzip compression

2021-11-05 Thread prx
* Theo de Raadt le [04-11-2021 08:27:47 -0600]: > prx wrote: > > > * Stuart Henderson le [04-11-2021 14:09:39 +]: > > > On 2021/11/04 14:21, prx wrote: > > > > Hello, > > > > The attached patch add support for static gzip compression. > > > > > > > > In other words, if a client support gzi

Re: [patch] httpd static gzip compression

2021-11-05 Thread Ingo Schwarze
Hi Theo, Theo de Raadt wrote on Thu, Nov 04, 2021 at 08:27:47AM -0600: > prx wrote: >> On 2021/11/04 14:21, prx wrote: >>> The attached patch add support for static gzip compression. >>> >>> In other words, if a client support gzip compression, when "file" is >>> requested, httpd will check if

Re: [patch] httpd static gzip compression

2021-11-04 Thread Maxim
Stuart Henderson, 2021-11-04 14:44:44 +: > On 2021/11/04 08:27, Theo de Raadt wrote: > > > Does any other program work this way? > > > > Where you request one filename, and it gives you another? > > Some of the webservers do, for language selection etc. Sometimes it's > useful. Fortunately t

Re: [patch] httpd static gzip compression

2021-11-04 Thread Sebastian Benoit
Theo de Raadt(dera...@openbsd.org) on 2021.11.04 08:53:13 -0600: > Stuart Henderson 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 handl

Re: [patch] httpd static gzip compression

2021-11-04 Thread Chris Cappuccio
Solene Rapenne [sol...@perso.pw] wrote: > On jeudi 4 novembre 2021 15:09:39 CET, Stuart Henderson wrote: > > > > btw this was rejected before, > > > > https://github.com/reyk/httpd/issues/21 > > It's not clear if "static" compression is rejected. Sure, on-the-fly > compilation is complicated and

Re: [patch] httpd static gzip compression

2021-11-04 Thread Florian Obser
On 2021-11-04 08:53 -06, "Theo de Raadt" wrote: > Oh, httpd was written for only that reason? That's incorrect. The other reason is need to know. -- I'm not entirely sure you are real.

Re: [patch] httpd static gzip compression

2021-11-04 Thread Theo de Raadt
Stuart Henderson 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 w

Re: [patch] httpd static gzip compression

2021-11-04 Thread Stuart Henderson
On 2021/11/04 08:27, Theo de Raadt wrote: > prx wrote: > > > * Stuart Henderson le [04-11-2021 14:09:39 +]: > > > On 2021/11/04 14:21, prx wrote: > > > > Hello, > > > > The attached patch add support for static gzip compression. > > > > > > > > In other words, if a client support gzip compr

Re: [patch] httpd static gzip compression

2021-11-04 Thread Theo de Raadt
prx wrote: > * Stuart Henderson le [04-11-2021 14:09:39 +]: > > On 2021/11/04 14:21, prx wrote: > > > Hello, > > > The attached patch add support for static gzip compression. > > > > > > In other words, if a client support gzip compression, when "file" is > > > requested, httpd will check i

Re: [patch] httpd static gzip compression

2021-11-04 Thread prx
* Stuart Henderson le [04-11-2021 14:09:39 +]: > On 2021/11/04 14:21, prx wrote: > > Hello, > > The attached patch add support for static gzip compression. > > > > In other words, if a client support gzip compression, when "file" is > > requested, httpd will check if "file.gz" is avaiable to

Re: [patch] httpd static gzip compression

2021-11-04 Thread Stuart Henderson
On 2021/11/04 14:21, prx wrote: > Hello, > The attached patch add support for static gzip compression. > > In other words, if a client support gzip compression, when "file" is > requested, httpd will check if "file.gz" is avaiable to serve. > > Regards. > > prx btw this was rejected before, ht

[patch] httpd static gzip compression

2021-11-04 Thread prx
Hello, The attached patch add support for static gzip compression. In other words, if a client support gzip compression, when "file" is requested, httpd will check if "file.gz" is avaiable to serve. Regards. prx Index: httpd.conf.5