App-httpstatus-more
view release on metacpan or search on metacpan
script/httpstatus view on Meta::CPAN
'Early Hints', # RFC 8297
'Checkpoint (unofficial)', # unofficial
],
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',
207 => 'Multi-Status', # RFC 2518 (WebDAV)
208 => 'Already Reported', # RFC 5842
218 => 'This is fine (Apache Web Server)',# unofficial
226 => 'IM Used', # RFC 3229 (Delta encoding)
300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
306 => 'Switch Proxy', # no longer used.
307 => 'Temporary Redirect',
308 => 'Permanent Redirect', # RFC 7538
400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Large',
415 => 'Unsupported Media Type',
416 => 'Request Range Not Satisfiable',
417 => 'Expectation Failed',
418 => 'I\'m a teapot', # RFC 2324
419 => 'Page Expired (Laravel Framework)',# unofficial
420 => [
'Enhance Your Calm (Twitter)', # unofficial
'Method Failure (Spring Framework)', # unofficial
],
421 => 'Misdirected Request', # RFC 7540
422 => 'Unprocessable Entity', # RFC 2518 (WebDAV)
423 => 'Locked', # RFC 2518 (WebDAV)
424 => 'Failed Dependency', # RFC 2518 (WebDAV)
425 => 'No code', # WebDAV Advanced Collections
426 => 'Upgrade Required', # RFC 2817
428 => 'Precondition Required',
429 => 'Too Many Requests',
430 => 'Request Header Fields Too Large (Shopify)', # unofficial
431 => 'Request Header Fields Too Large',
440 => 'Login Time-out (IIS)', # unofficial
444 => 'No Response (nginx)', # unofficial
449 => 'Retry with (IIS)', # unofficial
450 => 'Blocked by Windows Parental Controls (Microsoft)', # unofficial
451 => [
'Unavailable For Legal Reasons', # RFC 7725
'Redirect (IIS)', # unofficial
],
460 => '(AWS Elastic Load Balancer)', # unofficial
463 => '(AWS Elastic Load Balancer)', # unofficial
494 => 'Request header too large (nginx)',# unofficial
495 => 'SSL Certificate Error (nginx)', # unofficial
496 => 'SSL Certificate Required (nginx)',# unofficial
497 => 'HTTP Request Sent to HTTPS Port (nginx)', # unofficial
498 => 'Invalid Token (ArcGIS)', # unofficial
499 => [
'Token Required (ArcGIS)', # unofficial
'Client Closed Request (nginx)', # unofficial
],
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported',
506 => 'Variant Also Negotiates', # RFC 2295
507 => 'Insufficient Storage', # RFC 2518 (WebDAV)
508 => 'Loop Detected', # RFC 5842 (WebDAV)
509 => 'Bandwidth Limit Exceeded (Apache Web Server/cPanel)', # unofficial
510 => 'Not Extended', # RFC 2774
511 => 'Network Authentication Required', # RFC 6585
520 => 'Unknown Error (Cloudfare)', # unofficial
521 => 'Web Server Is Down (Cloudfare)', # unofficial
522 => 'Connection Timed Out (Cloudfare)',# unofficial
523 => 'Origin Is Unreachable (Cloudfare)', # unofficial
524 => 'A Timeout Occurred (Cloudfare)', # unofficial
525 => 'SSL Handshake Failed (Cloudfare)',# unofficial
526 => 'Invalid SSL Certificate (Cloudfare)', # unofficial
527 => 'Railgun Error (Cloudfare)', # unofficial
530 => [
'Site is frozen (Pantheon)', # unofficial
'Origin DNS Error (Cloudfare)', # unofficial
],
598 => 'Network read timeout error (unofficial)', # unofficial
);
if (@ARGV==1) {
my $key = shift @ARGV;
if (my $msg = $StatusCode{$key}) {
# httpstatus 403
# httpstatus 500
printf "%s\n", (ref $msg ? join("; ", @$msg) : $msg);
} elsif ($key =~ /^[12345]/) {
# httpstatus 4
# httpstatus 40
for (sort keys %StatusCode) {
next unless /^$key/;
my $msg = $StatusCode{$_};
print "$_ ", (ref $msg ? join("; ", @$msg) : $msg), "\n";
}
} else {
# httpstatus Bad
# httpstatus Forbidden
for (sort keys %StatusCode) {
( run in 2.137 seconds using v1.01-cache-2.11-cpan-40ba7b3775d )