]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4326:
authorMaxim Dounin <mdounin@mdounin.ru>
Sat, 4 Feb 2012 22:30:30 +0000 (22:30 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Sat, 4 Feb 2012 22:30:30 +0000 (22:30 +0000)
Fix for read_head with try_files and open_file_cache.

The of.read_ahead wasn't set in try_files code path, causing read_ahead
directive to be a nop if try_files and open_file_cache were used.

src/http/ngx_http_core_module.c

index c1fab30923cec5b6f5fb15f254d1d1c275b7c012..53f569cb848d12f3a4c6c21220a90e1ffd010253 100644 (file)
@@ -1289,6 +1289,7 @@ ngx_http_core_try_files_phase(ngx_http_request_t *r,
 
         ngx_memzero(&of, sizeof(ngx_open_file_info_t));
 
+        of.read_ahead = clcf->read_ahead;
         of.directio = clcf->directio;
         of.valid = clcf->open_file_cache_valid;
         of.min_uses = clcf->open_file_cache_min_uses;