aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_parse_time.h
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/core/ngx_parse_time.h
parentdd41bfd47a139a3fb4307f16faab7cdcbd8b1041 (diff)
downloadnginx-9984f3053f7c7f027aae9188111c4571962ff90c.tar.gz
nginx-9984f3053f7c7f027aae9188111c4571962ff90c.zip
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/core/ngx_parse_time.h')
-rw-r--r--src/core/ngx_parse_time.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/ngx_parse_time.h b/src/core/ngx_parse_time.h
new file mode 100644
index 000000000..aa542ebf5
--- /dev/null
+++ b/src/core/ngx_parse_time.h
@@ -0,0 +1,22 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#ifndef _NGX_PARSE_TIME_H_INCLUDED_
+#define _NGX_PARSE_TIME_H_INCLUDED_
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+
+
+time_t ngx_parse_http_time(u_char *value, size_t len);
+
+/* compatibility */
+#define ngx_http_parse_time(value, len) ngx_parse_http_time(value, len)
+
+
+#endif /* _NGX_PARSE_TIME_H_INCLUDED_ */