diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-01-07 17:47:17 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-01-07 17:47:17 +0000 |
| commit | 6eee80156ff4461064bc9116798db13bc7a82e2e (patch) | |
| tree | be596cf91d0a52fe6f4c9a450d40a21092a340e7 /src/http/modules | |
| parent | d5ca16cdd42b7625ba10e64dd45893b1683aaaef (diff) | |
| download | nginx-6eee80156ff4461064bc9116798db13bc7a82e2e.tar.gz nginx-6eee80156ff4461064bc9116798db13bc7a82e2e.tar.bz2 | |
count connection once per request
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_limit_zone_module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_limit_zone_module.c b/src/http/modules/ngx_http_limit_zone_module.c index 218c0de7f..e262a8176 100644 --- a/src/http/modules/ngx_http_limit_zone_module.c +++ b/src/http/modules/ngx_http_limit_zone_module.c @@ -107,6 +107,10 @@ ngx_http_limit_zone_handler(ngx_http_request_t *r) ngx_http_limit_zone_conf_t *lzcf; ngx_http_limit_zone_cleanup_t *lzcln; + if (r->limit_zone_set) { + return NGX_DECLINED; + } + lzcf = ngx_http_get_module_loc_conf(r, ngx_http_limit_zone_module); if (lzcf->shm_zone == NULL) { @@ -119,6 +123,8 @@ ngx_http_limit_zone_handler(ngx_http_request_t *r) return NGX_DECLINED; } + r->limit_zone_set = 1; + len = vv->len; hash = ngx_crc32_short(vv->data, len); |
