comparison src/http/ngx_http_header_filter_module.c @ 6965:3ef4cadfad7f

Added support for "429 Too Many Requests" response (RFC6585). This change adds reason phrase in status line and pretty response body when "429" status code is used in "return", "limit_conn_status" and/or "limit_req_status" directives. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author Piotr Sikora <piotrsikora@google.com>
date Fri, 24 Mar 2017 02:48:03 -0700
parents 25203fc377fb
children be5cfa918bfc
comparison
equal deleted inserted replaced
6964:5d3d9b52327d 6965:3ef4cadfad7f
99 ngx_null_string, /* "417 Expectation Failed" */ 99 ngx_null_string, /* "417 Expectation Failed" */
100 ngx_null_string, /* "418 unused" */ 100 ngx_null_string, /* "418 unused" */
101 ngx_null_string, /* "419 unused" */ 101 ngx_null_string, /* "419 unused" */
102 ngx_null_string, /* "420 unused" */ 102 ngx_null_string, /* "420 unused" */
103 ngx_string("421 Misdirected Request"), 103 ngx_string("421 Misdirected Request"),
104 104 ngx_null_string, /* "422 Unprocessable Entity" */
105 /* ngx_null_string, */ /* "422 Unprocessable Entity" */ 105 ngx_null_string, /* "423 Locked" */
106 /* ngx_null_string, */ /* "423 Locked" */ 106 ngx_null_string, /* "424 Failed Dependency" */
107 /* ngx_null_string, */ /* "424 Failed Dependency" */ 107 ngx_null_string, /* "425 unused" */
108 108 ngx_null_string, /* "426 Upgrade Required" */
109 #define NGX_HTTP_LAST_4XX 422 109 ngx_null_string, /* "427 unused" */
110 ngx_null_string, /* "428 Precondition Required" */
111 ngx_string("429 Too Many Requests"),
112
113 #define NGX_HTTP_LAST_4XX 430
110 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) 114 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX)
111 115
112 ngx_string("500 Internal Server Error"), 116 ngx_string("500 Internal Server Error"),
113 ngx_string("501 Not Implemented"), 117 ngx_string("501 Not Implemented"),
114 ngx_string("502 Bad Gateway"), 118 ngx_string("502 Bad Gateway"),