Skip to content

Commit

Permalink
Added HTTP codes as of RFC 6585
Browse files Browse the repository at this point in the history
Added descriptions for the new HTTP codes:

- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 511 Network Authentication Required
  • Loading branch information
jwendell committed Feb 8, 2013
1 parent 12d6c22 commit 301df3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sapi/cgi/cgi_main.c
Expand Up @@ -384,12 +384,16 @@ static const http_error http_error_codes[] = {
{413, "Request Entity Too Large"},
{414, "Request-URI Too Large"},
{415, "Unsupported Media Type"},
{428, "Precondition Required"},
{429, "Too Many Requests"},
{431, "Request Header Fields Too Large"},
{500, "Internal Server Error"},
{501, "Not Implemented"},
{502, "Bad Gateway"},
{503, "Service Unavailable"},
{504, "Gateway Time-out"},
{505, "HTTP Version not supported"},
{511, "Network Authentication Required"},
{0, NULL}
};

Expand Down
4 changes: 4 additions & 0 deletions sapi/cli/php_cli_server.c
Expand Up @@ -236,12 +236,16 @@ static php_cli_server_http_reponse_status_code_pair status_map[] = {
{ 415, "Unsupported Media Type" },
{ 416, "Requested Range Not Satisfiable" },
{ 417, "Expectation Failed" },
{ 428, "Precondition Required" },
{ 429, "Too Many Requests" },
{ 431, "Request Header Fields Too Large" },
{ 500, "Internal Server Error" },
{ 501, "Not Implemented" },
{ 502, "Bad Gateway" },
{ 503, "Service Unavailable" },
{ 504, "Gateway Timeout" },
{ 505, "HTTP Version Not Supported" },
{ 511, "Network Authentication Required" },
};

static php_cli_server_http_reponse_status_code_pair template_map[] = {
Expand Down
4 changes: 4 additions & 0 deletions sapi/fpm/fpm/fpm_main.c
Expand Up @@ -375,12 +375,16 @@ static const http_error http_error_codes[] = {
{413, "Request Entity Too Large"},
{414, "Request-URI Too Large"},
{415, "Unsupported Media Type"},
{428, "Precondition Required"},
{429, "Too Many Requests"},
{431, "Request Header Fields Too Large"},
{500, "Internal Server Error"},
{501, "Not Implemented"},
{502, "Bad Gateway"},
{503, "Service Unavailable"},
{504, "Gateway Time-out"},
{505, "HTTP Version not supported"},
{511, "Network Authentication Required"},
{0, NULL}
};

Expand Down

0 comments on commit 301df3e

Please sign in to comment.