Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gzip + 304 handling #56

Closed
wants to merge 2 commits into from
Closed

Support for Gzip + 304 handling #56

wants to merge 2 commits into from

Conversation

JackWink
Copy link

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
Copy link
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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants