Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Core: fixed inconsistent state of subrequest's headers_in list

Maxim Dounin
November 27, 2020 03:40PM
Hello!

On Fri, Nov 27, 2020 at 07:09:52PM +0100, Jan Prachař wrote:

> On Pá, 2020-11-27 at 20:43 +0300, Maxim Dounin wrote:
> > Hello!
> >
> > On Thu, Nov 26, 2020 at 09:11:39PM +0100, Jan Prachař wrote:
> >
> > > # HG changeset patch
> > > # User Jan Prachař <jan.prachar@gmail.com>
> > > # Date 1606420825 -3600
> > > # Thu Nov 26 21:00:25 2020 +0100
> > > # Node ID cf3d537ec6706f8713a757df256f2cfccb8f9b01
> > > # Parent e35b529b03781e64912e0d8a72bd0f957dc08cd2
> > > Core: fixed inconsistent state of subrequest's headers_in list
> > >
> > > When copying structure ngx_list_t, a reference to the last part need to be
> > > updated, if list contains only one part.
> > >
> > > This fixes an issue, when adding a header to the subrequest's headers_in list
> > > has no effect.
> >
> > Thank you for your patch.
>
> Hello Maxim,
>
> thank you for your reply.
>
> > Modules are not expected to modify r->headers_in. Instead,
> > consider using appropriate directives to set headers in upstream
> > requests, notably proxy_set_header.
>
> Okay, but there are modules that modifies it, notable openresty lua module, because there
> is no other way to modify headers that are sent to upstream on per-request basis.

Certainly there is a way to modify headers that are sent to
upstream o per-request basis. As previouly said, proxy_set_header
is a way to go. The $proxy_add_x_forwarded_for variable is a good
example how to do it on a per-request basis.

As for the lua module, I told the very same thing to the author
more than once. It's clearly his choice to do things not allowed
in nginx.

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

[PATCH] Core: fixed inconsistent state of subrequest's headers_in list

Jan Prachař 414 November 26, 2020 03:12PM

Re: [PATCH] Core: fixed inconsistent state of subrequest's headers_in list

Maxim Dounin 135 November 27, 2020 12:44PM

Re: [PATCH] Core: fixed inconsistent state of subrequest's headers_in list

Jan Prachař 125 November 27, 2020 01:12PM

Re: [PATCH] Core: fixed inconsistent state of subrequest's headers_in list

Maxim Dounin 162 November 27, 2020 03:40PM



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

Online Users

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