]> git.kaiwu.me - nginx.git/commitdiff
check daily time range
authorIgor Sysoev <igor@sysoev.ru>
Mon, 11 Aug 2008 17:50:37 +0000 (17:50 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 11 Aug 2008 17:50:37 +0000 (17:50 +0000)
src/http/modules/ngx_http_headers_filter_module.c

index f162a892efe93b45badb4ca1f9058e348c9124e5..f4a6fe76fd2df38a8df283ba978acf30a8e3d3b2 100644 (file)
@@ -553,6 +553,12 @@ ngx_http_headers_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         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";
     }