Mercurial > hg > nginx
diff src/core/ngx_parse_time.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 | src/http/ngx_http_parse_time.c@4c36e15651f7 |
children | 2cd019520210 |
line wrap: on
line diff
copy from src/http/ngx_http_parse_time.c copy to src/core/ngx_parse_time.c --- a/src/http/ngx_http_parse_time.c +++ b/src/core/ngx_parse_time.c @@ -7,13 +7,12 @@ #include <ngx_config.h> #include <ngx_core.h> -#include <ngx_http.h> static ngx_uint_t mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t -ngx_http_parse_time(u_char *value, size_t len) +ngx_parse_http_time(u_char *value, size_t len) { u_char *p, *end; ngx_int_t month;