Skip to content

Commit 59b0161

Browse files
jwendellsmalyshev
authored andcommitted
Added HTTP codes as of RFC 6585
Added descriptions for the new HTTP codes: - 428 Precondition Required - 429 Too Many Requests - 431 Request Header Fields Too Large - 511 Network Authentication Required
1 parent 263accb commit 59b0161

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ PHP NEWS
33
?? ??? 2012, PHP 5.4.13
44

55
- Core:
6+
. Implemented FR #64175 (Added HTTP codes as of RFC 6585). (Jonh Wendell)
67
. Fixed bug #64142 (dval to lval different behavior on ppc64). (Remi)
78

89
- CLI server:

sapi/cgi/cgi_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,16 @@ static const http_error http_error_codes[] = {
384384
{413, "Request Entity Too Large"},
385385
{414, "Request-URI Too Large"},
386386
{415, "Unsupported Media Type"},
387+
{428, "Precondition Required"},
388+
{429, "Too Many Requests"},
389+
{431, "Request Header Fields Too Large"},
387390
{500, "Internal Server Error"},
388391
{501, "Not Implemented"},
389392
{502, "Bad Gateway"},
390393
{503, "Service Unavailable"},
391394
{504, "Gateway Time-out"},
392395
{505, "HTTP Version not supported"},
396+
{511, "Network Authentication Required"},
393397
{0, NULL}
394398
};
395399

sapi/cli/php_cli_server.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,16 @@ static php_cli_server_http_reponse_status_code_pair status_map[] = {
236236
{ 415, "Unsupported Media Type" },
237237
{ 416, "Requested Range Not Satisfiable" },
238238
{ 417, "Expectation Failed" },
239+
{ 428, "Precondition Required" },
240+
{ 429, "Too Many Requests" },
241+
{ 431, "Request Header Fields Too Large" },
239242
{ 500, "Internal Server Error" },
240243
{ 501, "Not Implemented" },
241244
{ 502, "Bad Gateway" },
242245
{ 503, "Service Unavailable" },
243246
{ 504, "Gateway Timeout" },
244247
{ 505, "HTTP Version Not Supported" },
248+
{ 511, "Network Authentication Required" },
245249
};
246250

247251
static php_cli_server_http_reponse_status_code_pair template_map[] = {

sapi/fpm/fpm/fpm_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,16 @@ static const http_error http_error_codes[] = {
375375
{413, "Request Entity Too Large"},
376376
{414, "Request-URI Too Large"},
377377
{415, "Unsupported Media Type"},
378+
{428, "Precondition Required"},
379+
{429, "Too Many Requests"},
380+
{431, "Request Header Fields Too Large"},
378381
{500, "Internal Server Error"},
379382
{501, "Not Implemented"},
380383
{502, "Bad Gateway"},
381384
{503, "Service Unavailable"},
382385
{504, "Gateway Time-out"},
383386
{505, "HTTP Version not supported"},
387+
{511, "Network Authentication Required"},
384388
{0, NULL}
385389
};
386390

0 commit comments

Comments
 (0)