comparison src/http/ngx_http_header_filter_module.c @ 9249:afd36b161859

Updated HTTP status code descriptions to match RFC 9110. This patch changes the status codes and status pages served by freenginx to use the wording from RFC 9110. Exception for HTTP status code 413 "Request Entity Too Large", which is "Content Too Large" in the RFC. In that case we would lose information about what actually is too large, the request or the response.
author Michiel W. Beijen <mb@x14.nl>
date Sun, 14 Apr 2024 12:23:40 +0200
parents 0b51902d9f24
children
comparison
equal deleted inserted replaced
9248:8aac1f3bb39b 9249:afd36b161859
67 #define NGX_HTTP_OFF_3XX (NGX_HTTP_LAST_2XX - 200) 67 #define NGX_HTTP_OFF_3XX (NGX_HTTP_LAST_2XX - 200)
68 68
69 /* ngx_null_string, */ /* "300 Multiple Choices" */ 69 /* ngx_null_string, */ /* "300 Multiple Choices" */
70 70
71 ngx_string("301 Moved Permanently"), 71 ngx_string("301 Moved Permanently"),
72 ngx_string("302 Moved Temporarily"), 72 ngx_string("302 Found"),
73 ngx_string("303 See Other"), 73 ngx_string("303 See Other"),
74 ngx_string("304 Not Modified"), 74 ngx_string("304 Not Modified"),
75 ngx_null_string, /* "305 Use Proxy" */ 75 ngx_null_string, /* "305 Use Proxy" */
76 ngx_null_string, /* "306 unused" */ 76 ngx_null_string, /* "306 unused" */
77 ngx_string("307 Temporary Redirect"), 77 ngx_string("307 Temporary Redirect"),
83 ngx_string("400 Bad Request"), 83 ngx_string("400 Bad Request"),
84 ngx_string("401 Unauthorized"), 84 ngx_string("401 Unauthorized"),
85 ngx_string("402 Payment Required"), 85 ngx_string("402 Payment Required"),
86 ngx_string("403 Forbidden"), 86 ngx_string("403 Forbidden"),
87 ngx_string("404 Not Found"), 87 ngx_string("404 Not Found"),
88 ngx_string("405 Not Allowed"), 88 ngx_string("405 Method Not Allowed"),
89 ngx_string("406 Not Acceptable"), 89 ngx_string("406 Not Acceptable"),
90 ngx_null_string, /* "407 Proxy Authentication Required" */ 90 ngx_null_string, /* "407 Proxy Authentication Required" */
91 ngx_string("408 Request Time-out"), 91 ngx_string("408 Request Timeout"),
92 ngx_string("409 Conflict"), 92 ngx_string("409 Conflict"),
93 ngx_string("410 Gone"), 93 ngx_string("410 Gone"),
94 ngx_string("411 Length Required"), 94 ngx_string("411 Length Required"),
95 ngx_string("412 Precondition Failed"), 95 ngx_string("412 Precondition Failed"),
96 ngx_string("413 Request Entity Too Large"), 96 ngx_string("413 Request Entity Too Large"),
97 ngx_string("414 Request-URI Too Large"), 97 ngx_string("414 URI Too Long"),
98 ngx_string("415 Unsupported Media Type"), 98 ngx_string("415 Unsupported Media Type"),
99 ngx_string("416 Requested Range Not Satisfiable"), 99 ngx_string("416 Range Not Satisfiable"),
100 ngx_null_string, /* "417 Expectation Failed" */ 100 ngx_null_string, /* "417 Expectation Failed" */
101 ngx_null_string, /* "418 unused" */ 101 ngx_null_string, /* "418 unused" */
102 ngx_null_string, /* "419 unused" */ 102 ngx_null_string, /* "419 unused" */
103 ngx_null_string, /* "420 unused" */ 103 ngx_null_string, /* "420 unused" */
104 ngx_string("421 Misdirected Request"), 104 ngx_string("421 Misdirected Request"),
115 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX) 115 #define NGX_HTTP_OFF_5XX (NGX_HTTP_LAST_4XX - 400 + NGX_HTTP_OFF_4XX)
116 116
117 ngx_string("500 Internal Server Error"), 117 ngx_string("500 Internal Server Error"),
118 ngx_string("501 Not Implemented"), 118 ngx_string("501 Not Implemented"),
119 ngx_string("502 Bad Gateway"), 119 ngx_string("502 Bad Gateway"),
120 ngx_string("503 Service Temporarily Unavailable"), 120 ngx_string("503 Service Unavailable"),
121 ngx_string("504 Gateway Time-out"), 121 ngx_string("504 Gateway Timeout"),
122 ngx_string("505 HTTP Version Not Supported"), 122 ngx_string("505 HTTP Version Not Supported"),
123 ngx_null_string, /* "506 Variant Also Negotiates" */ 123 ngx_null_string, /* "506 Variant Also Negotiates" */
124 ngx_string("507 Insufficient Storage"), 124 ngx_string("507 Insufficient Storage"),
125 125
126 /* ngx_null_string, */ /* "508 unused" */ 126 /* ngx_null_string, */ /* "508 unused" */