Mercurial > hg > nginx-vendor-0-8
comparison src/event/ngx_event_pipe.c @ 276:c5c2b2883984 NGINX_0_5_8
nginx 0.5.8
*) Bugfix: a segmentation fault might occur if
"client_body_in_file_only on" was used and a request body was small.
*) Bugfix: a segmentation fault occurred if
"client_body_in_file_only on" and "proxy_pass_request_body off" or
"fastcgi_pass_request_body off" directives were used, and nginx
switched to a next upstream.
*) Bugfix: if the "proxy_buffering off" directive was used and a client
connection was non-active, then the connection was closed after send
timeout; bug appeared in 0.4.7.
*) Bugfix: if the "epoll" method was used and a client closed a
connection prematurely, then nginx closed the connection after a
send timeout only.
*) Bugfix: the "[alert] zero size buf" error when FastCGI server was
used.
*) Bugfixes in the "limit_zone" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 19 Jan 2007 00:00:00 +0300 |
parents | 052a7b1d40e5 |
children | 3dbecd747fbb |
comparison
equal
deleted
inserted
replaced
275:1779577cb845 | 276:c5c2b2883984 |
---|---|
418 | 418 |
419 static ngx_int_t | 419 static ngx_int_t |
420 ngx_event_pipe_write_to_downstream(ngx_event_pipe_t *p) | 420 ngx_event_pipe_write_to_downstream(ngx_event_pipe_t *p) |
421 { | 421 { |
422 size_t bsize; | 422 size_t bsize; |
423 ngx_uint_t flush; | 423 ngx_uint_t flush, prev_last_shadow; |
424 ngx_chain_t *out, **ll, *cl; | 424 ngx_chain_t *out, **ll, *cl; |
425 ngx_connection_t *downstream; | 425 ngx_connection_t *downstream; |
426 | 426 |
427 downstream = p->downstream; | 427 downstream = p->downstream; |
428 | 428 |
509 "pipe write busy: %uz", bsize); | 509 "pipe write busy: %uz", bsize); |
510 | 510 |
511 out = NULL; | 511 out = NULL; |
512 ll = NULL; | 512 ll = NULL; |
513 flush = 0; | 513 flush = 0; |
514 prev_last_shadow = 1; | |
514 | 515 |
515 for ( ;; ) { | 516 for ( ;; ) { |
516 if (p->out) { | 517 if (p->out) { |
517 cl = p->out; | 518 cl = p->out; |
518 | 519 |
519 if (cl->buf->recycled | 520 if (cl->buf->recycled |
520 && cl->buf->last_shadow | |
521 && bsize + cl->buf->last - cl->buf->pos > p->busy_size) | 521 && bsize + cl->buf->last - cl->buf->pos > p->busy_size) |
522 { | 522 { |
523 flush = 1; | 523 flush = 1; |
524 break; | 524 break; |
525 } | 525 } |
539 | 539 |
540 if (cl->buf->recycled | 540 if (cl->buf->recycled |
541 && cl->buf->last_shadow | 541 && cl->buf->last_shadow |
542 && bsize + cl->buf->last - cl->buf->pos > p->busy_size) | 542 && bsize + cl->buf->last - cl->buf->pos > p->busy_size) |
543 { | 543 { |
544 if (!prev_last_shadow) { | |
545 p->in = p->in->next; | |
546 | |
547 cl->next = NULL; | |
548 | |
549 if (out) { | |
550 *ll = cl; | |
551 } else { | |
552 out = cl; | |
553 } | |
554 } | |
555 | |
544 flush = 1; | 556 flush = 1; |
545 break; | 557 break; |
546 } | 558 } |
559 | |
560 prev_last_shadow = cl->buf->last_shadow; | |
547 | 561 |
548 p->in = p->in->next; | 562 p->in = p->in->next; |
549 | 563 |
550 } else { | 564 } else { |
551 break; | 565 break; |