From b8166baf08d2c7a9fa7565b355324f347ae043f9 Mon Sep 17 00:00:00 2001 From: qichengzx Date: Sun, 11 Feb 2018 17:24:58 +0800 Subject: complement the missing HTTP status codes --- system/core/Common.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'system') diff --git a/system/core/Common.php b/system/core/Common.php index 8d6253bea..b0c2d7a88 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -498,6 +498,8 @@ if ( ! function_exists('set_status_header')) $stati = array( 100 => 'Continue', 101 => 'Switching Protocols', + 102 => 'Processing', + 103 => 'Early Hints', 200 => 'OK', 201 => 'Created', @@ -506,6 +508,9 @@ if ( ! function_exists('set_status_header')) 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', + 207 => 'Multi-Status', + 208 => 'Already Reported', + 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', @@ -514,6 +519,7 @@ if ( ! function_exists('set_status_header')) 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', + 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', @@ -533,11 +539,14 @@ if ( ! function_exists('set_status_header')) 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', + 421 => 'Misdirected Request', 422 => 'Unprocessable Entity', + 423 => 'Locked', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented', @@ -545,6 +554,10 @@ if ( ! function_exists('set_status_header')) 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 508 => 'Loop Detected', + 510 => 'Not Extended', 511 => 'Network Authentication Required', ); -- cgit v1.2.3-24-g4f1b From 694a43722212558eb25322e72bae09d70b6d4a07 Mon Sep 17 00:00:00 2001 From: qichengzx Date: Tue, 13 Feb 2018 11:11:49 +0800 Subject: only retain 103, 207, 308, 421 and 451 --- system/core/Common.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'system') diff --git a/system/core/Common.php b/system/core/Common.php index b0c2d7a88..3a4ef425a 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -498,7 +498,6 @@ if ( ! function_exists('set_status_header')) $stati = array( 100 => 'Continue', 101 => 'Switching Protocols', - 102 => 'Processing', 103 => 'Early Hints', 200 => 'OK', @@ -509,8 +508,6 @@ if ( ! function_exists('set_status_header')) 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', - 208 => 'Already Reported', - 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', @@ -541,7 +538,6 @@ if ( ! function_exists('set_status_header')) 417 => 'Expectation Failed', 421 => 'Misdirected Request', 422 => 'Unprocessable Entity', - 423 => 'Locked', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', @@ -554,10 +550,6 @@ if ( ! function_exists('set_status_header')) 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 510 => 'Not Extended', 511 => 'Network Authentication Required', ); -- cgit v1.2.3-24-g4f1b