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.
Added support for gzip
304 shouldn't include a body and shouldn't be compressed
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.
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;
$response->compress = true;
Sounds like you already gave it some thought though, so I'll leave it in my fork. Thanks for the reply!