Output chain: zero size buf alerts in ngx_chain_writer().
Now we log a "zero size buf in chain writer" alert if we encounter a zero
sized buffer in ngx_chain_writer(), and skip the buffer.
Maxim Dounin
7 years ago
662 | 662 | |
663 | 663 | #if 1 |
664 | 664 | if (ngx_buf_size(in->buf) == 0 && !ngx_buf_special(in->buf)) { |
665 | ||
666 | ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0, | |
667 | "zero size buf in chain writer " | |
668 | "t:%d r:%d f:%d %p %p-%p %p %O-%O", | |
669 | in->buf->temporary, | |
670 | in->buf->recycled, | |
671 | in->buf->in_file, | |
672 | in->buf->start, | |
673 | in->buf->pos, | |
674 | in->buf->last, | |
675 | in->buf->file, | |
676 | in->buf->file_pos, | |
677 | in->buf->file_last); | |
678 | ||
665 | 679 | ngx_debug_point(); |
680 | ||
681 | continue; | |
666 | 682 | } |
667 | 683 | #endif |
668 | 684 | |
690 | 706 | |
691 | 707 | #if 1 |
692 | 708 | if (ngx_buf_size(cl->buf) == 0 && !ngx_buf_special(cl->buf)) { |
709 | ||
710 | ngx_log_error(NGX_LOG_ALERT, ctx->pool->log, 0, | |
711 | "zero size buf in chain writer " | |
712 | "t:%d r:%d f:%d %p %p-%p %p %O-%O", | |
713 | cl->buf->temporary, | |
714 | cl->buf->recycled, | |
715 | cl->buf->in_file, | |
716 | cl->buf->start, | |
717 | cl->buf->pos, | |
718 | cl->buf->last, | |
719 | cl->buf->file, | |
720 | cl->buf->file_pos, | |
721 | cl->buf->file_last); | |
722 | ||
693 | 723 | ngx_debug_point(); |
694 | } | |
695 | ||
724 | ||
725 | continue; | |
726 | } | |
696 | 727 | #endif |
697 | 728 | |
698 | 729 | size += ngx_buf_size(cl->buf); |