diff options
author | Valentin Bartenev <vbart@nginx.com> | 2013-04-03 14:13:35 +0000 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2013-04-03 14:13:35 +0000 |
commit | d88dffbf1addbb8315f3815cfd271557baae44eb (patch) | |
tree | 45531456d5add4f13af3a83c26cf23958bb31793 /src | |
parent | 600f9d3ea857297cf19d4055d72335c2a24594f7 (diff) | |
download | nginx-d88dffbf1addbb8315f3815cfd271557baae44eb.tar.gz nginx-d88dffbf1addbb8315f3815cfd271557baae44eb.zip |
Limit req: rate should be non-zero.
Specifying zero rate caused division by zero when calculating delays.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_limit_req_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index 934292e7f..90434c956 100644 --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -795,7 +795,7 @@ ngx_http_limit_req_zone(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } rate = ngx_atoi(value[i].data + 5, len - 5); - if (rate <= NGX_ERROR) { + if (rate <= 0) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid rate \"%V\"", &value[i]); return NGX_CONF_ERROR; |