changeset 2164:b4ffe603fa86

check daily time range
author Igor Sysoev <igor@sysoev.ru>
date Mon, 11 Aug 2008 17:50:37 +0000
parents 3e8a4d057b77
children cbf6f2eb57ad
files src/http/modules/ngx_http_headers_filter_module.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_headers_filter_module.c
+++ b/src/http/modules/ngx_http_headers_filter_module.c
@@ -553,6 +553,12 @@ ngx_http_headers_expires(ngx_conf_t *cf,
         return "invalid value";
     }
 
+    if (hcf->expires == NGX_HTTP_EXPIRES_DAILY
+        && hcf->expires_time > 24 * 60 * 60)
+    {
+        return "daily time value must be less than 24 hours";
+    }
+
     if (hcf->expires_time == NGX_PARSE_LARGE_TIME) {
         return "value must be less than 68 years";
     }