diff src/http/modules/ngx_http_not_modified_filter_module.c @ 444:33394d1255b0 NGINX_0_7_34

nginx 0.7.34 *) Feature: the "off" parameter of the "if_modified_since" directive. *) Feature: now nginx sends an HELO/EHLO command after a XCLIENT command. Thanks to Maxim Dounin. *) Feature: Microsoft specific "AUTH LOGIN with User Name" mode support in mail proxy server. Thanks to Maxim Dounin. *) Bugfix: in a redirect rewrite directive original arguments were concatenated with new arguments by an "?" rather than an "&"; the bug had appeared in 0.1.18. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built on AIX.
author Igor Sysoev <http://sysoev.ru>
date Tue, 10 Feb 2009 00:00:00 +0300
parents 9da1d9d94d18
children c8cfb6c462ef
line wrap: on
line diff
--- a/src/http/modules/ngx_http_not_modified_filter_module.c
+++ b/src/http/modules/ngx_http_not_modified_filter_module.c
@@ -61,6 +61,12 @@ ngx_int_t ngx_http_not_modified_header_f
         return ngx_http_next_header_filter(r);
     }
 
+    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+
+    if (clcf->if_modified_since == NGX_HTTP_IMS_OFF) {
+        return ngx_http_next_header_filter(r);
+    }
+
     ims = ngx_http_parse_time(r->headers_in.if_modified_since->value.data,
                               r->headers_in.if_modified_since->value.len);
 
@@ -69,9 +75,7 @@ ngx_int_t ngx_http_not_modified_header_f
 
     if (ims != r->headers_out.last_modified_time) {
 
-        clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
-        if (clcf->if_modified_since == 0
+        if (clcf->if_modified_since == NGX_HTTP_IMS_EXACT
             || ims < r->headers_out.last_modified_time)
         {
             return ngx_http_next_header_filter(r);