Welcome! Log In Create A New Profile

Advanced

Re: Does zero buffer allowed in the output buffer chain?

Jeff Kaufman
January 30, 2013 01:32PM
On Tue, Jan 29, 2013 at 10:03 PM, Liu Haifeng <haifeng.813@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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Does zero buffer allowed in the output buffer chain?

Liu Haifeng January 30, 2013 12:00AM

Re: Does zero buffer allowed in the output buffer chain?

Jeff Kaufman January 30, 2013 01:32PM

Re: Does zero buffer allowed in the output buffer chain?

Maxim Dounin January 30, 2013 02:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 234
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready