summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_headers_filter_module.c6
-rw-r--r--src/http/modules/ngx_http_log_module.c4
-rw-r--r--src/http/modules/ngx_http_userid_filter_module.c6
3 files changed, 4 insertions, 12 deletions
diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c
index daa17623c..ff33f1f78 100644
--- a/src/http/modules/ngx_http_headers_filter_module.c
+++ b/src/http/modules/ngx_http_headers_filter_module.c
@@ -530,7 +530,7 @@ ngx_http_headers_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
hcf->expires_time = ngx_parse_time(&value[n], 1);
- if (hcf->expires_time == NGX_ERROR) {
+ if (hcf->expires_time == (time_t) NGX_ERROR) {
return "invalid value";
}
@@ -540,10 +540,6 @@ ngx_http_headers_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
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";
- }
-
if (minus) {
hcf->expires_time = - hcf->expires_time;
}
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index c55131772..bfbbe93bd 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -1249,7 +1249,7 @@ ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
s.data = value[i].data + 9;
inactive = ngx_parse_time(&s, 1);
- if (inactive < 0) {
+ if (inactive == (time_t) NGX_ERROR) {
goto failed;
}
@@ -1272,7 +1272,7 @@ ngx_http_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
s.data = value[i].data + 6;
valid = ngx_parse_time(&s, 1);
- if (valid < 0) {
+ if (valid == (time_t) NGX_ERROR) {
goto failed;
}
diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c
index 894e2c14e..8713dd629 100644
--- a/src/http/modules/ngx_http_userid_filter_module.c
+++ b/src/http/modules/ngx_http_userid_filter_module.c
@@ -774,14 +774,10 @@ ngx_http_userid_expires(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
ucf->expires = ngx_parse_time(&value[1], 1);
- if (ucf->expires == NGX_ERROR) {
+ if (ucf->expires == (time_t) NGX_ERROR) {
return "invalid value";
}
- if (ucf->expires == NGX_PARSE_LARGE_TIME) {
- return "value must be less than 68 years";
- }
-
return NGX_CONF_OK;
}