From f259a2164cc3b9ff4e25abcabf747b27f673054e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 20 Mar 2018 06:12:31 +0100 Subject: [PATCH] [TASK] Add missing HTTP status code presets for PSR-7 responses They've been synched from the list of status codes at: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml This patch also corrects some misspelled reason phrases. Change-Id: I993d851d6ac5dc5fb2538149d1e399aed62227ad Releases: master, 8.7 Resolves: #84490 Related: #84481 Reviewed-on: https://review.typo3.org/56375 Tested-by: TYPO3com Reviewed-by: Mathias Brodala Reviewed-by: Frank Naegler Tested-by: Frank Naegler Reviewed-by: Stefan Neufeind Tested-by: Mathias Brodala --- typo3/sysext/core/Classes/Http/Response.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/typo3/sysext/core/Classes/Http/Response.php b/typo3/sysext/core/Classes/Http/Response.php index 92ced4b3b2d9..0c8e700e12ba 100644 --- a/typo3/sysext/core/Classes/Http/Response.php +++ b/typo3/sysext/core/Classes/Http/Response.php @@ -47,6 +47,7 @@ class Response extends Message implements ResponseInterface 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', + 103 => 'Early Hints', // SUCCESS CODES 200 => 'OK', 201 => 'Created', @@ -55,8 +56,9 @@ class Response extends Message implements ResponseInterface 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', - 207 => 'Multi-status', + 207 => 'Multi-Status', 208 => 'Already Reported', + 226 => 'IM Used', // REDIRECTION CODES 300 => 'Multiple Choices', 301 => 'Moved Permanently', @@ -66,6 +68,7 @@ class Response extends Message implements ResponseInterface 305 => 'Use Proxy', 306 => 'Switch Proxy', // Deprecated 307 => 'Temporary Redirect', + 308 => 'Permanent Redirect', // CLIENT ERROR 400 => 'Bad Request', 401 => 'Unauthorized', @@ -75,17 +78,18 @@ class Response extends Message implements ResponseInterface 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', - 408 => 'Request Time-out', + 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', + 413 => 'Payload Too Large', + 414 => 'URI Too Long', 415 => 'Unsupported Media Type', - 416 => 'Requested range not satisfiable', + 416 => 'Range Not Satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', + 421 => 'Misdirected Request', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', @@ -94,17 +98,19 @@ class Response extends Message implements ResponseInterface 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', // SERVER ERROR 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', - 504 => 'Gateway Time-out', - 505 => 'HTTP Version not supported', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 509 => 'Bandwidth Limit Exceeded', + 510 => 'Not Extended', 511 => 'Network Authentication Required' ];