comparison src/http/modules/ngx_http_not_modified_filter.c @ 356:2e3cbc1bbe3c

nginx-0.0.7-2004-06-16-19:32:11 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 16 Jun 2004 15:32:11 +0000
parents 70e1c7d2b83d
children da8c5707af39
comparison
equal deleted inserted replaced
355:0fb6c53fb135 356:2e3cbc1bbe3c
3 #include <ngx_core.h> 3 #include <ngx_core.h>
4 #include <ngx_http.h> 4 #include <ngx_http.h>
5 5
6 6
7 7
8 static int ngx_http_not_modified_filter_init(ngx_cycle_t *cycle); 8 static ngx_int_t ngx_http_not_modified_filter_init(ngx_cycle_t *cycle);
9 9
10 10
11 static ngx_http_module_t ngx_http_not_modified_filter_module_ctx = { 11 static ngx_http_module_t ngx_http_not_modified_filter_module_ctx = {
12 NULL, /* pre conf */ 12 NULL, /* pre conf */
13 13
33 33
34 34
35 static ngx_http_output_header_filter_pt ngx_http_next_header_filter; 35 static ngx_http_output_header_filter_pt ngx_http_next_header_filter;
36 36
37 37
38 static int ngx_http_not_modified_header_filter(ngx_http_request_t *r) 38 static ngx_int_t ngx_http_not_modified_header_filter(ngx_http_request_t *r)
39 { 39 {
40 time_t ims; 40 time_t ims;
41 41
42 if (r->headers_out.status != NGX_HTTP_OK 42 if (r->headers_out.status != NGX_HTTP_OK
43 || r->headers_in.if_modified_since == NULL 43 || r->headers_in.if_modified_since == NULL
69 69
70 return ngx_http_next_header_filter(r); 70 return ngx_http_next_header_filter(r);
71 } 71 }
72 72
73 73
74 static int ngx_http_not_modified_filter_init(ngx_cycle_t *cycle) 74 static ngx_int_t ngx_http_not_modified_filter_init(ngx_cycle_t *cycle)
75 { 75 {
76 ngx_http_next_header_filter = ngx_http_top_header_filter; 76 ngx_http_next_header_filter = ngx_http_top_header_filter;
77 ngx_http_top_header_filter = ngx_http_not_modified_header_filter; 77 ngx_http_top_header_filter = ngx_http_not_modified_header_filter;
78 78
79 return NGX_OK; 79 return NGX_OK;