Mercurial > hg > nginx-vendor-current
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 672:f41d4b305d22 NGINX_1_2_0
nginx 1.2.0
*) Bugfix: a segmentation fault might occur in a worker process if the
"try_files" directive was used; the bug had appeared in 1.1.19.
*) Bugfix: response might be truncated if there were more than IOV_MAX
buffers used.
*) Bugfix: in the "crop" parameter of the "image_filter" directive.
Thanks to Maxim Bublis.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 23 Apr 2012 00:00:00 +0400 |
parents | d0f7a625f27c |
children |
comparison
equal
deleted
inserted
replaced
671:47cb3497fbab | 672:f41d4b305d22 |
---|---|
87 prev = NULL; | 87 prev = NULL; |
88 iov = NULL; | 88 iov = NULL; |
89 | 89 |
90 /* create the iovec and coalesce the neighbouring bufs */ | 90 /* create the iovec and coalesce the neighbouring bufs */ |
91 | 91 |
92 for (cl = in; | 92 for (cl = in; cl && send < limit; cl = cl->next) { |
93 cl && header.nelts < IOV_MAX && send < limit; | 93 |
94 cl = cl->next) | |
95 { | |
96 if (ngx_buf_special(cl->buf)) { | 94 if (ngx_buf_special(cl->buf)) { |
97 continue; | 95 continue; |
98 } | 96 } |
99 | 97 |
100 #if 1 | 98 #if 1 |
130 | 128 |
131 if (prev == cl->buf->pos) { | 129 if (prev == cl->buf->pos) { |
132 iov->iov_len += (size_t) size; | 130 iov->iov_len += (size_t) size; |
133 | 131 |
134 } else { | 132 } else { |
133 if (header.nelts >= IOV_MAX) { | |
134 break; | |
135 } | |
136 | |
135 iov = ngx_array_push(&header); | 137 iov = ngx_array_push(&header); |
136 if (iov == NULL) { | 138 if (iov == NULL) { |
137 return NGX_CHAIN_ERROR; | 139 return NGX_CHAIN_ERROR; |
138 } | 140 } |
139 | 141 |