Does zero buffer allowed in the output buffer chain?
Jeff Kaufman
jefftk at google.com
Wed Jan 30 18:30:11 UTC 2013
On Tue, Jan 29, 2013 at 10:03 PM, Liu Haifeng <haifeng.813 at gmail.com> wrote:
>
> I am writing a http handler module, I found when the last buffer in
> the output buffer chain is zero, I'll get an alert in the error log about
> zero output buffer, and the browser will get no response after
> waiting a while, this is not what I am expecting as the buffer
> chain has data, just the last one has zero size.
Why is your last buffer empty? If you have other buffers in your
chain why do you need an empty buffer?
Regardless, marking your buffer as a sync buffer might be what you want:
b->pos = b->start = b->end = b->last = NULL;
b->sync = 1;
(See https://github.com/pagespeed/ngx_pagespeed/blob/master/src/ngx_pagespeed.cc#L121)
Jeff
More information about the nginx
mailing list