You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ko...@apache.org on 2016/09/27 16:20:28 UTC

svn commit: r1762515 - /httpd/httpd/trunk/modules/filters/mod_brotli.c

Author: kotkov
Date: Tue Sep 27 16:20:28 2016
New Revision: 1762515

URL: http://svn.apache.org/viewvc?rev=1762515&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/modules/filters/mod_brotli.c

Modified: httpd/httpd/trunk/modules/filters/mod_brotli.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_brotli.c?rev=1762515&r1=1762514&r2=1762515&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_brotli.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_brotli.c Tue Sep 27 16:20:28 2016
@@ -342,10 +342,12 @@ static apr_status_t compress_filter(ap_f
         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);