# HG changeset patch # User Michiel W. Beijen # Date 1713090220 -7200 # Node ID afd36b161859290167db7d653c5c7b603e8a1e97 # Parent 8aac1f3bb39bcde4c4c25857f89ac6d855913f9f 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. diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -69,7 +69,7 @@ static ngx_str_t ngx_http_status_lines[] /* ngx_null_string, */ /* "300 Multiple Choices" */ ngx_string("301 Moved Permanently"), - ngx_string("302 Moved Temporarily"), + ngx_string("302 Found"), ngx_string("303 See Other"), ngx_string("304 Not Modified"), ngx_null_string, /* "305 Use Proxy" */ @@ -85,18 +85,18 @@ static ngx_str_t ngx_http_status_lines[] ngx_string("402 Payment Required"), ngx_string("403 Forbidden"), ngx_string("404 Not Found"), - ngx_string("405 Not Allowed"), + ngx_string("405 Method Not Allowed"), ngx_string("406 Not Acceptable"), ngx_null_string, /* "407 Proxy Authentication Required" */ - ngx_string("408 Request Time-out"), + ngx_string("408 Request Timeout"), ngx_string("409 Conflict"), ngx_string("410 Gone"), ngx_string("411 Length Required"), ngx_string("412 Precondition Failed"), ngx_string("413 Request Entity Too Large"), - ngx_string("414 Request-URI Too Large"), + ngx_string("414 URI Too Long"), ngx_string("415 Unsupported Media Type"), - ngx_string("416 Requested Range Not Satisfiable"), + ngx_string("416 Range Not Satisfiable"), ngx_null_string, /* "417 Expectation Failed" */ ngx_null_string, /* "418 unused" */ ngx_null_string, /* "419 unused" */ @@ -117,8 +117,8 @@ static ngx_str_t ngx_http_status_lines[] ngx_string("500 Internal Server Error"), ngx_string("501 Not Implemented"), ngx_string("502 Bad Gateway"), - ngx_string("503 Service Temporarily Unavailable"), - ngx_string("504 Gateway Time-out"), + ngx_string("503 Service Unavailable"), + ngx_string("504 Gateway Timeout"), ngx_string("505 HTTP Version Not Supported"), ngx_null_string, /* "506 Variant Also Negotiates" */ ngx_string("507 Insufficient Storage"), diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -107,9 +107,9 @@ static char ngx_http_error_400_page[] = static char ngx_http_error_401_page[] = "" CRLF -"401 Authorization Required" CRLF +"401 Unauthorized" CRLF "" CRLF -"

401 Authorization Required

" CRLF +"

401 Unauthorized

" CRLF ; @@ -139,9 +139,9 @@ static char ngx_http_error_404_page[] = static char ngx_http_error_405_page[] = "" CRLF -"405 Not Allowed" CRLF +"405 Method Not Allowed" CRLF "" CRLF -"

405 Not Allowed

" CRLF +"

405 Method Not Allowed

" CRLF ; @@ -155,9 +155,9 @@ static char ngx_http_error_406_page[] = static char ngx_http_error_408_page[] = "" CRLF -"408 Request Time-out" CRLF +"408 Request Timeout" CRLF "" CRLF -"

408 Request Time-out

" CRLF +"

408 Request Timeout

" CRLF ; @@ -203,9 +203,9 @@ static char ngx_http_error_413_page[] = static char ngx_http_error_414_page[] = "" CRLF -"414 Request-URI Too Large" CRLF +"414 URI Too Long" CRLF "" CRLF -"

414 Request-URI Too Large

" CRLF +"

414 URI Too Long

" CRLF ; @@ -219,9 +219,9 @@ static char ngx_http_error_415_page[] = static char ngx_http_error_416_page[] = "" CRLF -"416 Requested Range Not Satisfiable" CRLF +"416 Range Not Satisfiable" CRLF "" CRLF -"

416 Requested Range Not Satisfiable

" CRLF +"

416 Range Not Satisfiable

" CRLF ; @@ -307,17 +307,17 @@ static char ngx_http_error_502_page[] = static char ngx_http_error_503_page[] = "" CRLF -"503 Service Temporarily Unavailable" CRLF +"503 Service Unavailable" CRLF "" CRLF -"

503 Service Temporarily Unavailable

" CRLF +"

503 Service Unavailable

" CRLF ; static char ngx_http_error_504_page[] = "" CRLF -"504 Gateway Time-out" CRLF +"504 Gateway Timeout" CRLF "" CRLF -"

504 Gateway Time-out

" CRLF +"

504 Gateway Timeout

" CRLF ;