"error_page"& "return" bug?

Nginx User nginx at nginxuser.net
Sun Feb 19 12:23:58 UTC 2012


On 19 February 2012 15:03, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
> It's not ignored, but returning error unconditionally in the
> server context also prevents error_page processing from
> working, as the "return 503" is again executed after error_page
> internal redirect.  That is, something like this happens:
>
> 1. Request comes for "/something".
> 2. Server rewrites generate 503.
> 3. Due to error_page set the request is internally redirected to
>   /error_docs/custom503.html.
> 4. Server rewrites again generate 503.
> 5. As we've already did error_page redirection, nginx ignores
>   error_page set and returns internal error page.

This then is the "bug".
It SHOULD now return "/error_docs/custom503.html" with a 503 status code.
I.E., work as it does when the error is issued within a location
context since once a user has set error_page, they would most likely
expect a matching status return to deliver what was set.

I assume there must be some technical road block but you guys are
supposed to be geniuses :)

Can't wait for the solution!!



More information about the nginx mailing list