Support for Gzip + 304 handling #56

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@JackWink

I've just added a $compress variable to the response that defaults to false.

If you set it to true, output gets gzipped.

304 as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html should not include a body, so I've added a conditional to make sure the response code isn't a 304 before echoing the body.

@peej
Owner
peej commented Oct 30, 2011

I've tried this before and people have had issues with Apache complaining about getting a compressed response back. I think it's safer to leave response compression to mod_deflate.

@JackWink

No issues here, but my use case probably isn't the common case. It doesn't compress by default, only if you set $response->compress = true;

Sounds like you already gave it some thought though, so I'll leave it in my fork. Thanks for the reply!

@JackWink JackWink closed this Nov 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment