summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2015-06-11 20:42:31 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2015-06-11 20:42:31 +0300
commit9984f3053f7c7f027aae9188111c4571962ff90c (patch)
tree8b8ad9c738f2a637e0cdd2e97fd9b8a180b1c2bb /src/http/modules
parentdd41bfd47a139a3fb4307f16faab7cdcbd8b1041 (diff)
downloadnginx-9984f3053f7c7f027aae9188111c4571962ff90c.tar.gz
nginx-9984f3053f7c7f027aae9188111c4571962ff90c.tar.bz2
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.
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_dav_module.c2
-rw-r--r--src/http/modules/ngx_http_headers_filter_module.c2
-rw-r--r--src/http/modules/ngx_http_not_modified_filter_module.c4
-rw-r--r--src/http/modules/ngx_http_range_filter_module.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c
index 529aba533..b9fadd001 100644
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -255,7 +255,7 @@ ngx_http_dav_put_handler(ngx_http_request_t *r)
ext.log = r->connection->log;
if (r->headers_in.date) {
- date = ngx_http_parse_time(r->headers_in.date->value.data,
+ date = ngx_parse_http_time(r->headers_in.date->value.data,
r->headers_in.date->value.len);
if (date != NGX_ERROR) {
diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c
index a356814e4..985e5b335 100644
--- a/src/http/modules/ngx_http_headers_filter_module.c
+++ b/src/http/modules/ngx_http_headers_filter_module.c
@@ -498,7 +498,7 @@ ngx_http_set_last_modified(ngx_http_request_t *r, ngx_http_header_val_t *hv,
}
r->headers_out.last_modified_time =
- (value->len) ? ngx_http_parse_time(value->data, value->len) : -1;
+ (value->len) ? ngx_parse_http_time(value->data, value->len) : -1;
return NGX_OK;
}
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 acc94ded3..032ba96fd 100644
--- a/src/http/modules/ngx_http_not_modified_filter_module.c
+++ b/src/http/modules/ngx_http_not_modified_filter_module.c
@@ -118,7 +118,7 @@ ngx_http_test_if_unmodified(ngx_http_request_t *r)
return 0;
}
- iums = ngx_http_parse_time(r->headers_in.if_unmodified_since->value.data,
+ iums = ngx_parse_http_time(r->headers_in.if_unmodified_since->value.data,
r->headers_in.if_unmodified_since->value.len);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
@@ -148,7 +148,7 @@ ngx_http_test_if_modified(ngx_http_request_t *r)
return 1;
}
- ims = ngx_http_parse_time(r->headers_in.if_modified_since->value.data,
+ ims = ngx_parse_http_time(r->headers_in.if_modified_since->value.data,
r->headers_in.if_modified_since->value.len);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c
index bb9a42c54..952da7553 100644
--- a/src/http/modules/ngx_http_range_filter_module.c
+++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -204,7 +204,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r)
goto next_filter;
}
- if_range_time = ngx_http_parse_time(if_range->data, if_range->len);
+ if_range_time = ngx_parse_http_time(if_range->data, if_range->len);
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http ir:%d lm:%d",