Welcome! Log In Create A New Profile

Advanced

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh)
November 10, 2014 05:26PM
Hello!

On Wed, Nov 5, 2014 at 5:08 PM, Yichun Zhang (agentzh) wrote:
> Sorry again, it actually checked "c->buffered &
> NGX_HTTP_LOWLEVEL_BUFFERED". This condition is indeed too strong and
> I've made it check its own busy bufs instead.
>

Hmm, the problem here is more complicated than I originally thought.
It seems that I still need to ensure that *all* the pending data has
been indeed flushed into the system send buffer in some special cases,
for example, in case of cosockets, I need to ensure that the response
header has indeed been flushed into the system send buffer
*completely* before proceeding to write to the socket directly.

The solution I end up with is like this: if the content handler has
its own busy bufs, then it uses NULL chain to flush the output
filters; otherwise construct a "special buf" with ->flush set to 1,
and feed it into the output filters. It seems to work quite well :)

Regards,
-agentzh

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

Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 1099 October 31, 2014 09:22PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Maxim Dounin 348 November 03, 2014 05:06PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 361 November 03, 2014 05:36PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Maxim Dounin 391 November 03, 2014 07:56PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 355 November 04, 2014 03:44PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Maxim Dounin 470 November 05, 2014 10:42AM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 304 November 05, 2014 08:04PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 336 November 05, 2014 08:10PM

Re: Gzip Gunzip: always flush busy bufs when the incoming chain is NULL.

Yichun Zhang (agentzh) 375 November 10, 2014 05:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 164
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