Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-03-14 22:24:17 +0300
committerIgor Sysoev <igor@sysoev.ru>2009-03-14 22:24:17 +0300
commitc7e87af678d43610c9ec82cc398b7133b9408580 (patch)
treee32967d49835a9ba1f8970d271029ae6591bf251 /src
parentbb7d615b3cbd7daa6b5195711427e374afa47c3a (diff)
fix case when regex locaiton runs the second time via internal redirect
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 2d4feab75..66698d525 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1378,13 +1378,15 @@ ngx_http_core_find_location(ngx_http_request_t *r)
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"test location: ~ \"%V\"", &(*clcfp)->name);
- if ((*clcfp)->captures && r->captures == NULL) {
+ if ((*clcfp)->captures) {
len = (NGX_HTTP_MAX_CAPTURES + 1) * 3;
- r->captures = ngx_palloc(r->pool, len * sizeof(int));
if (r->captures == NULL) {
- return NGX_ERROR;
+ r->captures = ngx_palloc(r->pool, len * sizeof(int));
+ if (r->captures == NULL) {
+ return NGX_ERROR;
+ }
}
}