diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-12-10 18:04:54 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-12-10 18:04:54 +0000 |
| commit | 59833d5450c8d9fa2c860b22e26813ea301cd514 (patch) | |
| tree | bb29cd5f6e8cedc0016c2a03ddbafbb8c92cc0fa /src/os/unix | |
| parent | c460629181248f47c6a77edacd9d17b7c1f26f12 (diff) | |
| download | nginx-59833d5450c8d9fa2c860b22e26813ea301cd514.tar.gz nginx-59833d5450c8d9fa2c860b22e26813ea301cd514.tar.bz2 | |
Merge of r4920, r4939: ngx_write_chain_to_file() fixes.
*) Core: added debug logging of writev() in ngx_write_chain_to_file().
*) 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.
Diffstat (limited to 'src/os/unix')
| -rw-r--r-- | src/os/unix/ngx_files.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index d71aec316..4fdf884fc 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -241,8 +241,12 @@ ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *cl, off_t offset, return NGX_ERROR; } + ngx_log_debug2(NGX_LOG_DEBUG_CORE, file->log, 0, + "writev: %d, %z", file->fd, n); + file->sys_offset += n; file->offset += n; + offset += n; total += n; } while (cl); |
