From: Evgeny Kotkov Date: Tue, 27 Sep 2016 16:20:28 +0000 (+0000) Subject: mod_brotli: Handle new 'no-brotli' internal environment variable that X-Git-Tag: 2.5.0-alpha~1129 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa58429108cdfff1fff6735942616c5258f86bf1;p=thirdparty%2Fapache%2Fhttpd.git mod_brotli: Handle new 'no-brotli' internal environment variable that disables Brotli compression for a particular request. This mimicks how mod_deflate handles the 'no-gzip' env variable, and should allow seamless migration for configurations that use it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1762515 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_brotli.c b/modules/filters/mod_brotli.c index 7b82fc98929..f8a0a2c487a 100644 --- a/modules/filters/mod_brotli.c +++ b/modules/filters/mod_brotli.c @@ -342,10 +342,12 @@ static apr_status_t compress_filter(ap_filter_t *f, apr_bucket_brigade *bb) const char *accepts; /* Only work on main request, not subrequests, that are not - * a 204 response with no content, and not a partial response - * to a Range request. + * a 204 response with no content, and are not tagged with the + * no-brotli env variable, and are not a partial response to + * a Range request. */ if (r->main || r->status == HTTP_NO_CONTENT + || apr_table_get(r->subprocess_env, "no-brotli") || apr_table_get(r->headers_out, "Content-Range")) { ap_remove_output_filter(f); return ap_pass_brigade(f->next, bb);