aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2012-02-10 10:48:58 +0000
committerValentin Bartenev <vbart@nginx.com>2012-02-10 10:48:58 +0000
commit9e8708cbd6da2ba2a2bdbc93c666aeee2dfefddc (patch)
tree340645ca1c70e9d4862b742a0fbe85fd8d96e4af
parente35ff2a08c737a39171a74e3492dcce24e45d055 (diff)
downloadnginx-9e8708cbd6da2ba2a2bdbc93c666aeee2dfefddc.tar.gz
nginx-9e8708cbd6da2ba2a2bdbc93c666aeee2dfefddc.zip
Limit conn: returned to the old behavior of using the first actual limit on
the way. It was unintentionally changed in r4272, so that it could only limit the first location where the processing of the request has reached PREACCESS phase.
-rw-r--r--src/http/modules/ngx_http_limit_conn_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_limit_conn_module.c b/src/http/modules/ngx_http_limit_conn_module.c
index f98e7bc51..6322fd682 100644
--- a/src/http/modules/ngx_http_limit_conn_module.c
+++ b/src/http/modules/ngx_http_limit_conn_module.c
@@ -159,8 +159,6 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r)
return NGX_DECLINED;
}
- r->main->limit_conn_set = 1;
-
lccf = ngx_http_get_module_loc_conf(r, ngx_http_limit_conn_module);
limits = lccf->limits.elts;
@@ -187,6 +185,8 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r)
continue;
}
+ r->main->limit_conn_set = 1;
+
hash = ngx_crc32_short(vv->data, len);
shpool = (ngx_slab_pool_t *) limits[i].shm_zone->shm.addr;