changeset 4938:64ffc28850bb

Core: fixed ngx_write_chain_to_file() with IOV_MAX reached. Catched by dav_chunked.t on Solaris. In released versions this might potentially result in corruption of complex protocol responses if they were written to disk and there were more distinct buffers than IOV_MAX in a single write.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 26 Nov 2012 21:19:57 +0000
parents 3b6594a2b79f
children 41bf14321133
files src/os/unix/ngx_files.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -246,6 +246,7 @@ ngx_write_chain_to_file(ngx_file_t *file
 
         file->sys_offset += n;
         file->offset += n;
+        offset += n;
         total += n;
 
     } while (cl);