]> granicus.if.org Git - php/commitdiff
Added HTTP codes as of RFC 6585
authorJonh Wendell <jonh.wendell@oiwifi.com.br>
Fri, 8 Feb 2013 16:09:11 +0000 (14:09 -0200)
committerStanislav Malyshev <stas@php.net>
Sun, 17 Feb 2013 09:18:40 +0000 (01:18 -0800)
Added descriptions for the new HTTP codes:

- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 511 Network Authentication Required

NEWS
sapi/cgi/cgi_main.c
sapi/cli/php_cli_server.c
sapi/fpm/fpm/fpm_main.c

diff --git a/NEWS b/NEWS
index 61fead4f3bdd6f34bc7766ea957b9e67b64a745c..02e8d64d5e4d6d4d395f37a28c22ec6946ddda8d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP                                                                        NEWS
 ?? ??? 2012, PHP 5.4.13
 
 - Core:
+  . Implemented FR #64175 (Added HTTP codes as of RFC 6585). (Jonh Wendell)
   . Fixed bug #64142 (dval to lval different behavior on ppc64). (Remi)
 
 - CLI server:
index 35402a47d98674d733b8b4f72701207c07021f54..c8dfec0f95e86d57ba5fbbab14a8bd2397a485a7 100644 (file)
@@ -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}
 };
 
index 6a4e7c53ab7c96edc20d6b7b0d6366f934fd5877..ab7f4cfd19de423e62e7bbf0095fa235d154b3b3 100644 (file)
@@ -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[] = {
index 40810f00bb0e62a00a8bba3dff32194b7978f0da..61088c465be9c21bc931d5a3aaffc50e7ff09228 100644 (file)
@@ -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}
 };