aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 5b7f44aa1..42dd6644e 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1240,7 +1240,7 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
reserve = len > r->uri.len - alias ? len - (r->uri.len - alias) : 0;
}
- if (reserve > allocated) {
+ if (reserve > allocated || !allocated) {
/* 16 bytes are preallocation */
allocated = reserve + 16;