Looking to get gzip running. Looked at the code at length last night
to figure out where it seems to fit. It was mentioned back here:
http://librelist.com/browser/mongrel2/2011/8/12/feature-requests-gzip-and-redirection/
but no real details on how Zed was planning on implementing.
I did run across a photon based site that was delivering gzipped
files. So it is possible.
Filters don't strike me as the right place for that. Filters strike me
as the spot to do HTTP caching. Though it does have access to the
pending responses in the deliverRing, so perhaps it can modify the
responses there?
I tried looking into doing it in Connection_deliver_raw_internal, but
conn->req had empty headers, so Request_get doesn't return the
'accept-encoding' header. Seems that this line is responsible? Not
sure what this is really doing.
// we don't need the header anymore, so commit the buffer and deal
with the body
check(IOBuf_read_commit(conn->iob,
Request_header_length(conn->req)) != -1, "Finaly commit failed
streaming the connection to http handlers.");
I know it is possible to do the gzipping with your handler, but what I
want is the Mongrel2 to gzipping CSS and JS. I feel like I am missing
something, so this email is my call for help. How do I get my Dir
handler to deliver gzipped files.