Hello! On Mon, Jun 05, 2017 at 09:59:45PM -0700, Piotr Sikora via nginx-devel wrote:
> Hey Maxim, > > > It doesn't look like "if (h[i].value.value.len)" is needed here. > > It is either true, or the "add_trailer" directive is nop and we > > already know this while parsing the configuration. > > > > - if (h[i].value.value.len) { > > - r->expect_trailers = 1; > > - break; > > - } > > + r->expect_trailers = 1; > > + break; > > Well, both "add_header" and "add_trailer" allow setting something like: > > add_trailer Empty ""; > > which will get added to headers / trailers list. > > I've added this extra check to avoid forcing chunked encoding with > such configuration. > > Maybe we should reject it during configuration instead, or ignore this > case and let it force chunked encoding? Which one do you prefer? I think it is perfectly ok to ignore this and let if force chunked encoding (and this is what the suggested change does). -- Maxim Dounin http://nginx.org/ _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel