Mercurial > hg > nginx
comparison src/core/ngx_output_chain.c @ 461:a88a3e4e158f release-0.1.5
nginx-0.1.5-RELEASE import
*) Bugfix: on Solaris and Linux there may be too many "recvmsg()
returned not enough data" alerts.
*) Bugfix: there were the "writev() failed (22: Invalid argument)"
errors on Solaris in proxy mode without sendfile. On other platforms
that do not support sendfile at all the process got caught in an
endless loop.
*) Bugfix: segmentation fault on Solaris in proxy mode and using
sendfile.
*) Bugfix: segmentation fault on Solaris.
*) Bugfix: on-line upgrade did not work on Linux.
*) Bugfix: the ngx_http_autoindex_module module did not escape the
spaces, the quotes, and the percent signs in the directory listing.
*) Change: the decrease of the copy operations.
*) Feature: the userid_p3p directive.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 14:07:14 +0000 |
parents | 295d97d70c69 |
children | bbd6b0b4a2b1 |
comparison
equal
deleted
inserted
replaced
460:5f8319142dfc | 461:a88a3e4e158f |
---|---|
160 | 160 |
161 if (ngx_buf_size(ctx->in->buf) == 0) { | 161 if (ngx_buf_size(ctx->in->buf) == 0) { |
162 ctx->in = ctx->in->next; | 162 ctx->in = ctx->in->next; |
163 } | 163 } |
164 | 164 |
165 ngx_alloc_link_and_set_buf(cl, ctx->buf, ctx->pool, NGX_ERROR); | 165 if (!(cl = ngx_alloc_chain_link(ctx->pool))) { |
166 return NGX_ERROR; | |
167 } | |
168 cl->buf = ctx->buf; | |
169 cl->next = NULL; | |
166 *last_out = cl; | 170 *last_out = cl; |
167 last_out = &cl->next; | 171 last_out = &cl->next; |
168 ctx->buf = NULL; | 172 ctx->buf = NULL; |
169 } | 173 } |
170 | 174 |
264 } | 268 } |
265 #endif | 269 #endif |
266 | 270 |
267 if ((size_t) n != size) { | 271 if ((size_t) n != size) { |
268 ngx_log_error(NGX_LOG_ALERT, src->file->log, 0, | 272 ngx_log_error(NGX_LOG_ALERT, src->file->log, 0, |
269 ngx_read_file_n " reads only %d of %d from file", | 273 ngx_read_file_n " reads only %z of %uz from file", |
270 n, size); | 274 n, size); |
271 if (n == 0) { | 275 if (n == 0) { |
272 return NGX_ERROR; | 276 return NGX_ERROR; |
273 } | 277 } |
274 } | 278 } |
304 | 308 |
305 | 309 |
306 for (/* void */; in; in = in->next) { | 310 for (/* void */; in; in = in->next) { |
307 | 311 |
308 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, | 312 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, |
309 "WRITER buf: %d", ngx_buf_size(in->buf)); | 313 "chain writer buf size: %uz", ngx_buf_size(in->buf)); |
310 | 314 |
311 ngx_alloc_link_and_set_buf(cl, in->buf, ctx->pool, NGX_ERROR); | 315 if (!(cl = ngx_alloc_chain_link(ctx->pool))) { |
316 return NGX_ERROR; | |
317 } | |
318 cl->buf = in->buf; | |
319 cl->next = NULL; | |
312 *ctx->last = cl; | 320 *ctx->last = cl; |
313 ctx->last = &cl->next; | 321 ctx->last = &cl->next; |
314 } | 322 } |
315 | 323 |
316 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, | 324 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, |
317 "WRITER0: %X", ctx->out); | 325 "chain writer in: %p", ctx->out); |
318 | 326 |
319 ctx->out = ngx_send_chain(ctx->connection, ctx->out, ctx->limit); | 327 ctx->out = ngx_send_chain(ctx->connection, ctx->out, ctx->limit); |
320 | 328 |
321 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, | 329 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0, |
322 "WRITER1: %X", ctx->out); | 330 "chain writer out: %p", ctx->out); |
323 | 331 |
324 if (ctx->out == NGX_CHAIN_ERROR) { | 332 if (ctx->out == NGX_CHAIN_ERROR) { |
325 return NGX_ERROR; | 333 return NGX_ERROR; |
326 } | 334 } |
327 | 335 |