Permalink
Browse files

Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Added HTTP codes as of RFC 6585
  • Loading branch information...
2 parents d3291de + 59b0161 commit c877fcf6eca2a2836957a83539f6a8a4a1976ae2 @smalyshev smalyshev committed Feb 17, 2013
Showing with 13 additions and 0 deletions.
  1. +1 −0 NEWS
  2. +4 −0 sapi/cgi/cgi_main.c
  3. +4 −0 sapi/cli/php_cli_server.c
  4. +4 −0 sapi/fpm/fpm/fpm_main.c
View
1 NEWS
@@ -3,6 +3,7 @@ PHP NEWS
?? ??? 201?, PHP 5.5.0 Beta 1
- Core:
+ . Implemented FR #64175 (Added HTTP codes as of RFC 6585). (Jonh Wendell)
. Fixed bug #64135 (Exceptions from set_error_handler are not always
propagated). (Laruence)
. Fixed bug #63830 (Segfault on undefined function call in nested generator).
View
@@ -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}
};
@@ -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[] = {
View
@@ -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}
};

0 comments on commit c877fcf

Please sign in to comment.