Welcome! Log In Create A New Profile

Advanced

Re: Nginx Brunzip

Maxim Dounin
April 20, 2020 02:54PM
Hello!

On Thu, Apr 16, 2020 at 03:48:27PM +1000, Mathew Heard wrote:

> Maxim,
>
> > Likely unrealted, but "ctx->flush = FLUSH_NOFLUSH" at
> >
> https://github.com/splitice/ngx_brunzip_module/blob/master/ngx_http_brunzip_filter_module.c#L393
> > is meaningless.
>
> Is beause of
> https://github.com/splitice/ngx_brunzip_module/blob/master/ngx_http_brunzip_filter_module.c#L513
> correct?
> Because FLUSH_FLUSH always resets state to FLUSH_NOFLUSH.

No. Because of the "ctx->flush != FLUSH_NOFLUSH" condition at the
very start of the same function. In the particular place the
ctx->field is guaranteed to be set to FLUSH_NOFLUSH, and there is
no need to set it again.

As you can see in the original code, there is no assignment.
Instead, it simply states that "ctx->flush == Z_NO_FLUSH" in a
comment.

(http://hg.nginx.org/nginx/file/3a860f22c879/src/http/modules/ngx_http_gunzip_filter_module.c#l365)

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Brunzip

splitice April 14, 2020 08:22PM

Re: Nginx Brunzip

Maxim Dounin April 15, 2020 01:14PM

Re: Nginx Brunzip

Mathew Heard April 15, 2020 08:50PM

Re: Nginx Brunzip

Mathew Heard April 15, 2020 11:14PM

Re: Nginx Brunzip

Mathew Heard April 15, 2020 11:16PM

Re: Nginx Brunzip

Mathew Heard April 15, 2020 11:38PM

Re: Nginx Brunzip

Mathew Heard April 16, 2020 01:50AM

Re: Nginx Brunzip

Maxim Dounin April 20, 2020 02:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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