Skip to content

Commit 0266ef4

Browse files
Merge pull request #22 from dolmen/fix/RT104102-add-status-308
Add HTTP status 308 (RFC 7238)
2 parents aed8e0a + dab5961 commit 0266ef4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/HTTP/Status.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ my %StatusCode = (
3636
304 => 'Not Modified',
3737
305 => 'Use Proxy',
3838
307 => 'Temporary Redirect',
39+
308 => 'Permanent Redirect', # RFC 7238
3940
400 => 'Bad Request',
4041
401 => 'Unauthorized',
4142
402 => 'Payment Required',
@@ -165,6 +166,7 @@ tag to import them all.
165166
HTTP_NOT_MODIFIED (304)
166167
HTTP_USE_PROXY (305)
167168
HTTP_TEMPORARY_REDIRECT (307)
169+
HTTP_PERMANENT_REDIRECT (308)
168170
169171
HTTP_BAD_REQUEST (400)
170172
HTTP_UNAUTHORIZED (401)

t/status.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!perl -w
22

33
use Test;
4-
plan tests => 9;
4+
plan tests => 10;
55

66
use HTTP::Status qw(:constants :is status_message);
77

@@ -12,6 +12,7 @@ ok(is_success(HTTP_ACCEPTED));
1212
ok(is_error(HTTP_BAD_REQUEST));
1313
ok(is_client_error(HTTP_I_AM_A_TEAPOT));
1414
ok(is_redirect(HTTP_MOVED_PERMANENTLY));
15+
ok(is_redirect(HTTP_PERMANENT_REDIRECT));
1516

1617
ok(!is_success(HTTP_NOT_FOUND));
1718

0 commit comments

Comments
 (0)