mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
Limit req: rate should be non-zero.
Specifying zero rate caused division by zero when calculating delays.
This commit is contained in:
parent
600f9d3ea8
commit
d88dffbf1a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user