]> git.kaiwu.me - nginx.git/commitdiff
Bugfix of r4086: directio was always enabled if mp4 file was sent as is.
authorIgor Sysoev <igor@sysoev.ru>
Fri, 9 Sep 2011 11:13:55 +0000 (11:13 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 9 Sep 2011 11:13:55 +0000 (11:13 +0000)
src/http/modules/ngx_http_mp4_module.c

index 92138469c2c693d70c677cd8183c5a5f67bf3271..c5997c5e8293420f30bcf60acf20c37e5a72583d 100644 (file)
@@ -410,6 +410,7 @@ ngx_http_mp4_handler(ngx_http_request_t *r)
     ngx_memzero(&of, sizeof(ngx_open_file_info_t));
 
     of.read_ahead = clcf->read_ahead;
+    of.directio = NGX_MAX_OFF_T_VALUE;
     of.valid = clcf->open_file_cache_valid;
     of.min_uses = clcf->open_file_cache_min_uses;
     of.errors = clcf->open_file_cache_errors;
@@ -534,6 +535,8 @@ ngx_http_mp4_handler(ngx_http_request_t *r)
                           ngx_directio_on_n " \"%s\" failed", path.data);
         }
 
+        of.is_directio = 1;
+
         if (mp4) {
             mp4->file.directio = 1;
         }