Bug 63186

Summary: Error pages aren't compressed (404, 410)
Product: Apache httpd-2 Reporter: ZK <contact>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: major    
Priority: P2    
Version: 2.4.29   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description ZK 2019-02-17 22:40:19 UTC

I've just noticed that the 404 et 410 pages of my websites aren't compressed (no Content-Encoding header, they're sent in plain text).
I use mod_brotli and mod_gzip as a fallback.

Maybe there's something wrong in my setup, but if that's the case, a lot of big websites have the same problem. Apparently, NGinx, Varnish and Caddy do compress 404 and 410 responses... but Apache httpd server doesn't.

This is a shame because some websites have a lot of these, not because they're broken, but because they have a lot of temporary content (events, classifieds, for exemple).
Plus, it makes the users wait longer to see a broken page, which is quite annoying.

Is there a good reason why Apache httpd doesn't compress 404 and 410 pages?
During my researches, I couldn't find anything about it, but found some quite big 404 pages, weighting more than 100KB, which is a lot on Edge connections.
Comment 1 Reindl Harald 2019-02-24 07:33:28 UTC
Apache Trafficserver as proxy suffers from the same problem

"content-encoding: br" for 200 responses, no content-encoding for 404 repsones and since the backend-httpd don't support "br" and backend connections don't send "Accept-Encoding" by intention to keep compression load from the backend it's for sure the proxy in my case