diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-02-10 15:05:05 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-02-10 15:05:05 +0000 |
| commit | 2c33648e52a6f355b426e617dd3fc577961c5193 (patch) | |
| tree | 5ded7f244233d44be18fb0e82475a8dffb9a11fa /src/http/modules | |
| parent | 09f6cd5fa930eb22ace086ecb71571ffb5071080 (diff) | |
| download | nginx-2c33648e52a6f355b426e617dd3fc577961c5193.tar.gz nginx-2c33648e52a6f355b426e617dd3fc577961c5193.tar.bz2 | |
if_modified_since off
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_not_modified_filter_module.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_not_modified_filter_module.c b/src/http/modules/ngx_http_not_modified_filter_module.c index 389a3a93a..feed9cf54 100644 --- 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_filter(ngx_http_request_t *r) 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_filter(ngx_http_request_t *r) 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); |
