comparison src/http/modules/ngx_http_not_modified_filter_module.c @ 6180:8b6fa4842133

Moved ngx_http_parse_time() to core, renamed accordingly. The function is now called ngx_parse_http_time(), and can be used by any code to parse HTTP-style date and time. In particular, it will be used for OCSP stapling. For compatibility, a macro to map ngx_http_parse_time() to the new name provided for a while.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 11 Jun 2015 20:42:31 +0300
parents 5fb1e57c758a
children
comparison
equal deleted inserted replaced
6179:c61210e2e081 6180:8b6fa4842133
116 116
117 if (r->headers_out.last_modified_time == (time_t) -1) { 117 if (r->headers_out.last_modified_time == (time_t) -1) {
118 return 0; 118 return 0;
119 } 119 }
120 120
121 iums = ngx_http_parse_time(r->headers_in.if_unmodified_since->value.data, 121 iums = ngx_parse_http_time(r->headers_in.if_unmodified_since->value.data,
122 r->headers_in.if_unmodified_since->value.len); 122 r->headers_in.if_unmodified_since->value.len);
123 123
124 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 124 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
125 "http iums:%T lm:%T", iums, r->headers_out.last_modified_time); 125 "http iums:%T lm:%T", iums, r->headers_out.last_modified_time);
126 126
146 146
147 if (clcf->if_modified_since == NGX_HTTP_IMS_OFF) { 147 if (clcf->if_modified_since == NGX_HTTP_IMS_OFF) {
148 return 1; 148 return 1;
149 } 149 }
150 150
151 ims = ngx_http_parse_time(r->headers_in.if_modified_since->value.data, 151 ims = ngx_parse_http_time(r->headers_in.if_modified_since->value.data,
152 r->headers_in.if_modified_since->value.len); 152 r->headers_in.if_modified_since->value.len);
153 153
154 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 154 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
155 "http ims:%T lm:%T", ims, r->headers_out.last_modified_time); 155 "http ims:%T lm:%T", ims, r->headers_out.last_modified_time);
156 156