Opened 13 years ago

Closed 10 years ago

#98 closed defect (fixed)

Unable to set Retry-After header with 503 response

Reported by: phillipoldham.myopenid.com Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.0.x
Keywords: Cc:
uname -a: n/a
nginx -V: all versions

Description

Currently its not possible to use add_header to set a Retry-After header when responding with a 503 header. This causes a problems when trying to inform clients to retry after a timeout when to bring backends back-up after an error.

There are currently work-arounds which involve issuing the headers via a dynamic language (either with a proxy or the perl module) however this may not be possible if these are the cause of the 503.

Suggested resolutions:
Either allow "add_headers retry-after" for 50x errors, or change the syntax of error_page to allow one to append "retry-after x" to the entry and have nginx add the header.

Change History (2)

comment:1 by Sergey Kandaurov <pluknet@…>, 10 years ago

In 74ffe03555d002388159365afddc0cbe4967c35c/nginx:

Headers filter: "add_header" with "always" parameter (ticket #98).

If specified, the header field is set regardless of the status code.

comment:2 by Sergey Kandaurov, 10 years ago

Resolution: fixed
sensitive: 0
Status: newclosed
Note: See TracTickets for help on using tickets.