The best I can find is that the it may only be searching for "/.gz" and not
checking to see if the default index file "/index.html.gz" exists.


src/usr.sbin/httpd/server_file.c

if (r != NULL && strstr(r->kv_value, "gzip") != NULL) {
        /* append ".gz" to path and check existence */
        ret = snprintf(gzpath, sizeof(gzpath), "%s.gz", path);
                goto abort;


Jim


On Thursday, November 9th, 2023 at 07:37, Paul Pace <[email protected]> wrote:


> I have gzip-static set in a server block in httpd.conf.
> 
> If I make the following request:
> 
> curl -I -H 'Accept-Encoding: gzip,deflate' http://example.com
> 
> the response has no Content-Encoding header and the Content-Length
> matches /var/www/htdocs/index.html.
> 
> If I make the following request:
> 
> curl -I -H 'Accept-Encoding: gzip,deflate' http://example.com/index.html
> 
> the response includes Content-Encoding: gzip and the Content-Length
> matches /var/www/htdocts/index.html.gz.
> 
> Is there some additional configuration required or is this the intended
> output for the option?
> 
> Thank you,
> 
> Paul

Reply via email to