Unknown 428 http status code description via nginx
pluknet at nginx.com
Thu Jun 2 13:51:23 UTC 2022
> On 1 Jun 2022, at 16:32, libresco_27 <nginx-forum at forum.nginx.org> wrote:
> I added 428 as an allowed http status code that can be returned from nginx.
> But when I access this from postman/insomnia the status code description
> comes out to be "unknown". eg - HTTP/1.1 428 Unknown, instead of HTTP/1.1
> 428 Precondition Required
> From my nginx gateway, I am just returning the status code and no
> description. And this works fine for all the other status codes.
The reason phrase, that's the status code description, is an optional
part of the status line in HTTP/1.1, it doesn't present in subsequent
HTTP versions. Moreover, citing the relevant parts of RFC:
- The reason-phrase element exists for the sole purpose of providing
a textual description associated with the numeric status code
- the reason-phrase .. might be translated for a given locale,
overwritten by intermediaries, or discarded
So it should be fine to have it absent.
More information about the nginx