mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
fix case when the first try is shorter then URI
This commit is contained in:
parent
288e503e92
commit
42c67dd5fb
@ -1086,12 +1086,8 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
|
|||||||
len = tf->name.len;
|
len = tf->name.len;
|
||||||
}
|
}
|
||||||
|
|
||||||
reserve = len - r->uri.len;
|
|
||||||
|
|
||||||
/* 16 bytes are preallocation */
|
/* 16 bytes are preallocation */
|
||||||
reserve = reserve < 16 ? 16 : reserve + 16;
|
reserve = ngx_abs((ssize_t) (len - r->uri.len)) + alias + 16;
|
||||||
|
|
||||||
reserve += alias;
|
|
||||||
|
|
||||||
if (reserve > allocated) {
|
if (reserve > allocated) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user