comparison src/http/ngx_http_core_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 4f6efabcb09b
children 4bc94faeff66
comparison
equal deleted inserted replaced
6179:c61210e2e081 6180:8b6fa4842133
2193 2193
2194 if (!(p & NGX_HTTP_GZIP_PROXIED_EXPIRED)) { 2194 if (!(p & NGX_HTTP_GZIP_PROXIED_EXPIRED)) {
2195 return NGX_DECLINED; 2195 return NGX_DECLINED;
2196 } 2196 }
2197 2197
2198 expires = ngx_http_parse_time(e->value.data, e->value.len); 2198 expires = ngx_parse_http_time(e->value.data, e->value.len);
2199 if (expires == NGX_ERROR) { 2199 if (expires == NGX_ERROR) {
2200 return NGX_DECLINED; 2200 return NGX_DECLINED;
2201 } 2201 }
2202 2202
2203 d = r->headers_out.date; 2203 d = r->headers_out.date;
2204 2204
2205 if (d) { 2205 if (d) {
2206 date = ngx_http_parse_time(d->value.data, d->value.len); 2206 date = ngx_parse_http_time(d->value.data, d->value.len);
2207 if (date == NGX_ERROR) { 2207 if (date == NGX_ERROR) {
2208 return NGX_DECLINED; 2208 return NGX_DECLINED;
2209 } 2209 }
2210 2210
2211 } else { 2211 } else {