Mercurial > hg > ngx_http_upstream_keepalive
changeset 4:e18e4613b841
Keepalive: unbreak cache size parsing and protect from zero.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 23 Oct 2008 19:11:15 +0400 |
parents | 42e64900483b |
children | e7d1b49e0611 |
files | ngx_http_upstream_keepalive_module.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ngx_http_upstream_keepalive_module.c +++ b/ngx_http_upstream_keepalive_module.c @@ -54,7 +54,7 @@ static char *ngx_http_upstream_keepalive static ngx_command_t ngx_http_upstream_keepalive_commands[] = { { ngx_string("keepalive"), - NGX_HTTP_UPS_CONF|NGX_CONF_NOARGS, + NGX_HTTP_UPS_CONF|NGX_CONF_NOARGS|NGX_CONF_TAKE1, ngx_http_upstream_keepalive, 0, 0, @@ -370,7 +370,7 @@ ngx_http_upstream_keepalive(ngx_conf_t * if (ngx_strncmp(value[i].data, "cached=", 7) == 0) { n = ngx_atoi(&value[i].data[7], value[i].len - 7); - if (n == NGX_ERROR) { + if (n == NGX_ERROR || n == 0) { goto invalid; }