]> git.kaiwu.me - nginx.git/commitdiff
nginx could not be build without gzip, introduced in r2052
authorIgor Sysoev <igor@sysoev.ru>
Tue, 1 Jul 2008 06:31:16 +0000 (06:31 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 1 Jul 2008 06:31:16 +0000 (06:31 +0000)
src/http/ngx_http_header_filter_module.c

index 777b526e77bb0b0fe36003500d1be2a94c534e4d..7714873e028bdd5b0289422fa331718978bb81dc 100644 (file)
@@ -347,9 +347,11 @@ ngx_http_header_filter(ngx_http_request_t *r)
         len += sizeof("Connection: closed" CRLF) - 1;
     }
 
+#if (NGX_HTTP_GZIP)
     if (r->gzip && clcf->gzip_vary) {
         len += sizeof("Vary: Accept-Encoding" CRLF) - 1;
     }
+#endif
 
     part = &r->headers_out.headers.part;
     header = part->elts;
@@ -520,10 +522,12 @@ ngx_http_header_filter(ngx_http_request_t *r)
                              sizeof("Connection: close" CRLF) - 1);
     }
 
+#if (NGX_HTTP_GZIP)
     if (r->gzip && clcf->gzip_vary) {
         b->last = ngx_cpymem(b->last, "Vary: Accept-Encoding" CRLF,
                              sizeof("Vary: Accept-Encoding" CRLF) - 1);
     }
+#endif
 
     part = &r->headers_out.headers.part;
     header = part->elts;