Post Ad52yuMdbnGa2aKFMG by erincandescent@queer.af
(DIR) More posts by erincandescent@queer.af
(DIR) Post #Ad52yl6M2xtTJTdcEC by mcc@mastodon.social
2023-12-21T04:20:01Z
0 likes, 0 repeats
If I enable mod_gzip in apache, and a large-ish but highly compressible file gets accessed 100,000 times, will apache gzip it 100,000 times or will it gzip it once and cache the gzipped version?
(DIR) Post #Ad52ymiK3HrIJWPS2y by mcc@mastodon.social
2023-12-21T04:42:58Z
0 likes, 0 repeats
Related question: Say I'm using the magic conf block from https://httpd.apache.org/docs/2.4/mod/mod_deflate.html#precompressedBut also it appears mod_gzip or mod_deflate or something is on— I don't remember enabling it, but https://www.giftofspeed.com/gzip-test/ says it's on.How do I test whether it is mod_deflate or this weird mod_header trick which is handling any one request? In other words, how do I verify this paste block is doing anything at all?
(DIR) Post #Ad52ynYQvXXgv8n4Gu by mcc@mastodon.social
2023-12-21T05:05:05Z
0 likes, 0 repeats
One more question: Say I'm using the above block, and I take Measures ("Header append X-gzip-canary Yes", as recommended by Vriska Serket, who follows me here on Mastodon) to check if the .gz cache is being accepted. And it's not being accepted.Should I expect an <IfModule mod_headers.c> *inside* a <VirtualHost> block to work as expected (IE, to both work, and to only apply to the specific VirtualHost of that block)?
(DIR) Post #Ad52yoEGQ10F0sMTTM by mcc@mastodon.social
2023-12-21T05:08:31Z
0 likes, 0 repeats
*head in hands* wait. So the x-gzip-canary header is in the FIlesMatch. If I download https://domain/styles2.css, I do not see the x-gzip-canary in Chrome. But if I download https://domain/styles2.css.gz, I *do* see the header. So… what does that mean? That the FilesMatch only applies to manually-dialed .css.gz files? Or that the IfModule block is not rewriting as I expect it to?
(DIR) Post #Ad52yp07Y5HfPIkh4C by mcc@mastodon.social
2023-12-21T05:09:43Z
0 likes, 0 repeats
Wait. Wait! I've figured out the most reliable way to figure out whether it's working or not. I simply put *different content* in the .css file than I put in the .css.gz file. And based on this… it's not working. The recommended configuration block from the Apache manual does nothing at all. I am at a loss how, or whether, to proceed.
(DIR) Post #Ad52ypnOashPs7o2s4 by mcc@mastodon.social
2023-12-21T05:15:58Z
0 likes, 0 repeats
Chrome's headers say it will accept any of "gzip", "deflate", or "br". Is "gzip" different from "deflate"? man gzip seems to suggest it… sometimes? always? deflates?br is … "brotli"? is it good?
(DIR) Post #Ad52yqcnVloeRXr5zU by erincandescent@queer.af
2023-12-22T21:27:23Z
1 likes, 0 repeats
@mcc gzip is "deflate with gzip headers" and "deflate" is "deflate with zlib headers"why do we have both? historical reasons...
(DIR) Post #Ad52yqvwMb81OuoNpQ by mcc@mastodon.social
2023-12-21T05:18:41Z
0 likes, 0 repeats
Now I shall seethe
(DIR) Post #Ad52yrUgHQux8f47yi by mcc@mastodon.social
2023-12-22T21:28:36Z
0 likes, 0 repeats
@erincandescent So should I assume that any browser which supports (ie, declares support for) deflate will necessarily always support (ie, declare support for) gzip?
(DIR) Post #Ad52yraLwLSFQFieoq by mcc@mastodon.social
2023-12-22T20:38:11Z
0 likes, 0 repeats
So I was trying to figure out why the rewrite directives I added to my apache .conf, were not having any effect. An IRC channel recommended added logging, so I did. Now I need to debug why the logging directives I added to my apache .conf are not having any effect.
(DIR) Post #Ad52ysDha2vjOI859U by erincandescent@queer.af
2023-12-22T21:30:19Z
0 likes, 0 repeats
@mcc generally yesOld (we're talking ancient) versions of IIS would send a raw deflate stream for "deflate" (without zlib headers) so everyone has shied away form it and preferred deflate ever since(who can blame them, the encoding token should be "zlib"...)
(DIR) Post #Ad52ysvewc5lachBfU by mcc@mastodon.social
2023-12-22T21:31:11Z
0 likes, 0 repeats
@erincandescent you mean, they have shied away from deflate [headers] and preferred gzip [headers]?
(DIR) Post #Ad52ytdGKUyDlr60dE by mcc@mastodon.social
2023-12-22T21:15:29Z
0 likes, 0 repeats
Okay. So here are two interesting things I have learned today with the help of the Apache IRC channel:- The snippet in the Apache docs at https://httpd.apache.org/docs/2.4/mod/mod_deflate.html#precompressed does not work in the case of a vhost, because %{REQUEST_FILENAME} is not as expected in this case. You have to say %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.- mod_rewrite does not work unless you turn mod_rewrite on.(I had thought I had mod_rewrite on. But guess what.)
(DIR) Post #Ad52ytdcJBFnmxGIBU by erincandescent@queer.af
2023-12-22T21:32:23Z
1 likes, 0 repeats
@mcc browsers these days tend to prefer "gzip" over "deflate". webservers often only implement "gzip"all this becuase nobody has ever misimplemented gzip, but Microsoft did once in the 90s misimplement "deflate"
(DIR) Post #Ad52yuMdbnGa2aKFMG by erincandescent@queer.af
2023-12-22T21:32:44Z
2 likes, 0 repeats
@mcc the (difference between "gzip" and "deflate" is gzip has 12 bytes more overhead and a slightly slower checksum)