From: Faidon Liambotis Date: Fri, 28 Mar 2014 10:23:16 +0000 (+0200) Subject: HttpStatus: add RFC 6585 status codes X-Git-Tag: 1.31.0-rc.0~16441^2~1 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=c4f14616c4636efcb00e9f77cbaa7f7774f0d855;p=lhc%2Fweb%2Fwiklou.git HttpStatus: add RFC 6585 status codes Add newer (Apr 2012) HTTP status codes & their messages to HttpStatus' getMessage. Adds 428, 429, 431, 511 per RFC 6585, "Additional HTTP Status Codes". Change-Id: Ia055880c4b2f3ac43cf5d94dbdd45a3690a58569 --- diff --git a/includes/libs/HttpStatus.php b/includes/libs/HttpStatus.php index 4f626b23c5..d72ffcabb0 100644 --- a/includes/libs/HttpStatus.php +++ b/includes/libs/HttpStatus.php @@ -75,13 +75,17 @@ class HttpStatus { 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', + 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', - 507 => 'Insufficient Storage' + 507 => 'Insufficient Storage', + 511 => 'Network Authentication Required', ); return isset( $statusMessage[$code] ) ? $statusMessage[$code] : null; }