Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Maxim Dounin
June 14, 2017 12:56PM
Hello!

On Wed, Jun 14, 2017 at 06:12:25PM +0300, Valentin V. Bartenev wrote:

> On Tuesday 13 June 2017 05:19:54 Piotr Sikora via nginx-devel wrote:
> > # HG changeset patch
> > # User Piotr Sikora <piotrsikora@google.com>
> > # Date 1490351854 25200
> > # Fri Mar 24 03:37:34 2017 -0700
> > # Node ID 73f67e06ab103e0368d1810c6f8cac5c70c4e246
> > # Parent 07a5d26b49f04425ff54cc998f885aa987b7823f
> > HTTP/2: added support for trailers in HTTP responses.
> >
> > Signed-off-by: Piotr Sikora <piotrsikora@google.com>
> >
> [..]
> > +
> > + if (header[i].key.len > NGX_HTTP_V2_MAX_FIELD) {
> > + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,
> > + "too long response trailer name: \"%V\"",
> > + &header[i].key);
> > + return NULL;
> > + }
> > +
> > + if (header[i].value.len > NGX_HTTP_V2_MAX_FIELD) {
> > + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,
> > + "too long response trailer value: \"%V: %V\"",
> > + &header[i].key, &header[i].value);
> > + return NULL;
> > + }
> [..]
>
> I've overlooked this while doing previous review, but it looks strange.
>
> Why do you use NGX_LOG_WARN for trailers headers? It results in
> finalizing request with an error (in case of HTTP/2 it means RST_STREAM).
>
> For main headers the NGX_LOG_CRIT level is used. It looks too serious,
> but the WARN level is too low.
>
> It seems the right log level for both cases is NGX_LOG_ERR.
>
> So I'm going to commit the patch below:

[...]

Given that the limit is about 2 megabytes, I don't think that this
can be triggered in practice by a backend. As such, NGX_LOG_CRIT
looks logical, as the only practically possible reason for the
test to fail is a bug somewhere.

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

[PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Piotr Sikora via nginx-devel 661 June 13, 2017 08:22AM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Valentin V. Bartenev 265 June 14, 2017 11:14AM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Maxim Dounin 184 June 14, 2017 12:56PM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Valentin V. Bartenev 212 June 14, 2017 01:08PM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Maxim Dounin 322 June 14, 2017 01:34PM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Maxim Dounin 209 June 15, 2017 11:48AM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Piotr Sikora via nginx-devel 240 June 17, 2017 04:50PM

Re: [PATCH 2 of 3] HTTP/2: added support for trailers in HTTP responses

Piotr Sikora via nginx-devel 261 June 17, 2017 04:50PM



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

Online Users

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