php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64175
Patch patch revision 2013-02-08 17:45 UTC by jonh dot wendell at gmail dot com

Patch patch for Unknown/Other Function Bug #64175

Patch version 2013-02-08 17:45 UTC

Return to Bug #64175 | Download this patch
Patch Revisions:

Developer: jonh.wendell@gmail.com

From 301df3e10a53bbb7d976875cb68c354d5e1c9a90 Mon Sep 17 00:00:00 2001
From: Jonh Wendell <jonh.wendell@oiwifi.com.br>
Date: Fri, 8 Feb 2013 14:09:11 -0200
Subject: [PATCH] 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
---
 sapi/cgi/cgi_main.c       |    4 ++++
 sapi/cli/php_cli_server.c |    4 ++++
 sapi/fpm/fpm/fpm_main.c   |    4 ++++
 3 files changed, 12 insertions(+)

diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index fbb9f51..9e6b74a 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -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}
 };
 
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 566ea6d..1d2ceff 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -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[] = {
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 40810f0..61088c4 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -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}
 };
 
-- 
1.7.10.4

 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 02:02:10 2014 UTC