Welcome! Log In Create A New Profile

Advanced

Re: Regression in 1.14 when following upstream redirects

May 16, 2018 10:08AM
Hey,


Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Mon, May 14, 2018 at 01:22:46PM -0400, vedranf wrote:
>
> > There is a problem when nginx is configured to try to follow
> redirects (301)
> > from upstream server in order to cache responses being directed to,
> rather
> > than the short redirect itself. This worked in 1.12 and earlier
> releases.
> > Here is the simplified configuration I use and which used to work:
> >
>
> From the incomplete configuration and debug log snippets you've
> provided it looks like your problem if that requests previously
> not cached now successfully extracted from cache.
>
> From the snippets you've provided it is not possible to conclude
> if the previous behaviour was buggy and now fixed (and your
> previous configuration worked due to a bug), or the new behaviour
> is incorrect.
>
> There are at least some fixes in 1.13.x which might affect your
> configuration. In particular, this fix in 1.13.6 might be
> related:
>
> *) Bugfix: cache control headers were ignored when caching errors
> intercepted by error_page.

Right, this seems to be causing it. I was able to replicate it only when 3XX redirect had Cache-Control set. Please look at the minimal configuration at: https://pastebin.com/tSqH4YJt
with 1.12 you always get 204 response from 127.0.0.1:8181, with 1.14 first response is 204, but the subsequent responses are 500 with invalid URL prefix in "" error because in the second attempt request never goes to upstream (perhaps it assumes file is supposed to be in cache) and the variable is empty.

Regards,
Vedran
Subject Author Posted

Regression in 1.14 when following upstream redirects

vedranf May 14, 2018 01:22PM

Re: Regression in 1.14 when following upstream redirects

Maxim Dounin May 14, 2018 11:40PM

Re: Regression in 1.14 when following upstream redirects

vedranf May 16, 2018 10:08AM

Re: Regression in 1.14 when following upstream redirects

Maxim Dounin May 16, 2018 10:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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