summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/site/lib/HTTP/Status.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/HTTP/Status.pm')
-rw-r--r--Master/tlpkg/tlperl/site/lib/HTTP/Status.pm46
1 files changed, 30 insertions, 16 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/HTTP/Status.pm b/Master/tlpkg/tlperl/site/lib/HTTP/Status.pm
index b7cf8fc1f98..e4a59c3e384 100644
--- a/Master/tlpkg/tlperl/site/lib/HTTP/Status.pm
+++ b/Master/tlpkg/tlperl/site/lib/HTTP/Status.pm
@@ -3,7 +3,7 @@ package HTTP::Status;
use strict;
use warnings;
-our $VERSION = '6.22';
+our $VERSION = '6.27';
require 5.002; # because we use prototypes
@@ -33,7 +33,7 @@ my %StatusCode = (
207 => 'Multi-Status', # RFC 4918: WebDAV
208 => 'Already Reported', # RFC 5842: WebDAV bindings
# 209 .. 225
- 226 => 'IM used', # RFC 3229: Delta encoding
+ 226 => 'IM Used', # RFC 3229: Delta encoding
# 227 .. 299
300 => 'Multiple Choices',
301 => 'Moved Permanently',
@@ -57,17 +57,17 @@ my %StatusCode = (
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed', # RFC 7232: Conditional Request
- 413 => 'Request Entity Too Large',
- 414 => 'Request-URI Too Large',
+ 413 => 'Payload Too Large',
+ 414 => 'URI Too Long',
415 => 'Unsupported Media Type',
- 416 => 'Request Range Not Satisfiable', # RFC 7233: Range Requests
+ 416 => 'Range Not Satisfiable', # RFC 7233: Range Requests
417 => 'Expectation Failed',
# 418 .. 420
421 => 'Misdirected Request', # RFC 7540: HTTP/2
422 => 'Unprocessable Entity', # RFC 4918: WebDAV
423 => 'Locked', # RFC 4918: WebDAV
424 => 'Failed Dependency', # RFC 4918: WebDAV
-# 425
+ 425 => 'Too Early', # RFC 8470: Using Early Data in HTTP
426 => 'Upgrade Required',
# 427
428 => 'Precondition Required', # RFC 6585: Additional Codes
@@ -75,7 +75,7 @@ my %StatusCode = (
# 430
431 => 'Request Header Fields Too Large', # RFC 6585: Additional Codes
# 432 .. 450
- 451 => 'Unavailable For Legal Reasons', # RFC 7724: Legal Obstacles
+ 451 => 'Unavailable For Legal Reasons', # RFC 7725: Legal Obstacles
# 452 .. 499
500 => 'Internal Server Error',
501 => 'Not Implemented',
@@ -95,7 +95,6 @@ my %StatusCode = (
%StatusCode = (
%StatusCode,
418 => 'I\'m a teapot', # RFC 2324: HTCPC/1.0 1-april
- 425 => 'Unordered Collection', # WebDAV Draft
449 => 'Retry with', # microsoft
509 => 'Bandwidth Limit Exceeded', # Apache / cPanel
);
@@ -118,8 +117,21 @@ die if $@;
*RC_MOVED_TEMPORARILY = \&RC_FOUND; # 302 was renamed in the standard
push(@EXPORT, "RC_MOVED_TEMPORARILY");
-*RC_NO_CODE = \&RC_UNORDERED_COLLECTION;
-push(@EXPORT, "RC_NO_CODE");
+my %compat = (
+ REQUEST_ENTITY_TOO_LARGE => \&HTTP_PAYLOAD_TOO_LARGE,
+ REQUEST_URI_TOO_LARGE => \&HTTP_URI_TOO_LONG,
+ REQUEST_RANGE_NOT_SATISFIABLE => \&HTTP_RANGE_NOT_SATISFIABLE,
+ NO_CODE => \&HTTP_TOO_EARLY,
+ UNORDERED_COLLECTION => \&HTTP_TOO_EARLY,
+);
+
+foreach my $name (keys %compat) {
+ push(@EXPORT, "RC_$name");
+ push(@EXPORT_OK, "HTTP_$name");
+ no strict 'refs';
+ *{"RC_$name"} = $compat{$name};
+ *{"HTTP_$name"} = $compat{$name};
+}
our %EXPORT_TAGS = (
constants => [grep /^HTTP_/, @EXPORT_OK],
@@ -141,6 +153,7 @@ sub is_cacheable_by_default ($) { $_[0] && ( $_[0] == 200 # OK
|| $_[0] == 206 # Not Acceptable
|| $_[0] == 300 # Multiple Choices
|| $_[0] == 301 # Moved Permanently
+ || $_[0] == 308 # Permanent Redirect
|| $_[0] == 404 # Not Found
|| $_[0] == 405 # Method Not Allowed
|| $_[0] == 410 # Gone
@@ -162,7 +175,7 @@ HTTP::Status - HTTP Status code processing
=head1 VERSION
-version 6.22
+version 6.27
=head1 SYNOPSIS
@@ -228,15 +241,16 @@ tag to import them all.
HTTP_GONE (410)
HTTP_LENGTH_REQUIRED (411)
HTTP_PRECONDITION_FAILED (412)
- HTTP_REQUEST_ENTITY_TOO_LARGE (413)
- HTTP_REQUEST_URI_TOO_LARGE (414)
+ HTTP_PAYLOAD_TOO_LARGE (413)
+ HTTP_URI_TOO_LONG (414)
HTTP_UNSUPPORTED_MEDIA_TYPE (415)
- HTTP_REQUEST_RANGE_NOT_SATISFIABLE (416)
+ HTTP_RANGE_NOT_SATISFIABLE (416)
HTTP_EXPECTATION_FAILED (417)
HTTP_MISDIRECTED REQUEST (421)
HTTP_UNPROCESSABLE_ENTITY (422)
HTTP_LOCKED (423)
HTTP_FAILED_DEPENDENCY (424)
+ HTTP_TOO_EARLY (425)
HTTP_UPGRADE_REQUIRED (426)
HTTP_PRECONDITION_REQUIRED (428)
HTTP_TOO_MANY_REQUESTS (429)
@@ -269,7 +283,7 @@ The status_message() function will translate status codes to human
readable strings. The string is the same as found in the constant
names above. If the $code is not registered in the L<list of IANA HTTP Status
Codes|https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>
-then C<undef> is returned.
+then C<undef> is returned.
=item is_info( $code )
@@ -335,7 +349,7 @@ Gisle Aas <gisle@activestate.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 1994-2017 by Gisle Aas.
+This software is copyright (c) 1994 by Gisle Aas.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.