[Remove entries to the current 2.0 section below, when backported]
+ *) mod_deflate: Don't deflate responses with zero length
+ e.g. proxied 304's [Allan Edwards]
+
*) <VirtualHost myhost> now applies to all IP addresses for myhost
instead of just the first one reported by the resolver. This
corrects a regression since 1.3. [Jeff Trawick]
* we're in better shape.
*/
if (!ctx) {
+ int eos_only = 1;
+ apr_bucket *bkt;
char *buf, *token;
const char *encoding;
return ap_pass_brigade(f->next, bb);
}
}
+
+ /* don't deflate responses with zero length e.g. proxied 304's */
+ for (bkt = APR_BRIGADE_FIRST(bb);
+ bkt != APR_BRIGADE_SENTINEL(bb);
+ bkt = APR_BUCKET_NEXT(bkt))
+ {
+ if (!APR_BUCKET_IS_EOS(bkt)) {
+ eos_only = 0;
+ break;
+ }
+ }
+ if (eos_only) {
+ return ap_pass_brigade(f->next, bb);
+ }
+
/* We're cool with filtering this. */
ctx = f->ctx = apr_pcalloc(r->pool, sizeof(*ctx));
ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc);