File Coverage

blib/lib/HTTP/Throwable/Role/Status/NotAcceptable.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 12 14 85.7


line stmt bran cond sub pod time code
1             package HTTP::Throwable::Role::Status::NotAcceptable;
2             our $AUTHORITY = 'cpan:STEVAN';
3             $HTTP::Throwable::Role::Status::NotAcceptable::VERSION = '0.027';
4 1     1   614 use Moo::Role;
  1         3  
  1         8  
5              
6             with(
7             'HTTP::Throwable',
8             'HTTP::Throwable::Role::BoringText',
9             );
10              
11 2     2 0 84 sub default_status_code { 406 }
12 2     2 0 7526 sub default_reason { 'Not Acceptable' }
13              
14 1     1   412 no Moo::Role; 1;
  1         3  
  1         6  
15              
16             =pod
17              
18             =encoding UTF-8
19              
20             =head1 NAME
21              
22             HTTP::Throwable::Role::Status::NotAcceptable - 406 Not Acceptable
23              
24             =head1 VERSION
25              
26             version 0.027
27              
28             =head1 DESCRIPTION
29              
30             The resource identified by the request is only capable of generating
31             response entities which have content characteristics not acceptable
32             according to the accept headers sent in the request.
33              
34             Unless it was a HEAD request, the response SHOULD include an entity
35             containing a list of available entity characteristics and location(s)
36             from which the user or user agent can choose the one most appropriate.
37             The entity format is specified by the media type given in the
38             Content-Type header field. Depending upon the format and the capabilities
39             of the user agent, selection of the most appropriate choice MAY be
40             performed automatically. However, this specification does not define
41             any standard for such automatic selection.
42              
43             Note: HTTP/1.1 servers are allowed to return responses which are
44             not acceptable according to the accept headers sent in the
45             request. In some cases, this may even be preferable to sending a
46             406 response. User agents are encouraged to inspect the headers of
47             an incoming response to determine if it is acceptable.
48              
49             If the response could be unacceptable, a user agent SHOULD temporarily
50             stop receipt of more data and query the user for a decision on further
51             actions.
52              
53             =head1 AUTHORS
54              
55             =over 4
56              
57             =item *
58              
59             Stevan Little
60              
61             =item *
62              
63             Ricardo Signes
64              
65             =back
66              
67             =head1 COPYRIGHT AND LICENSE
68              
69             This software is copyright (c) 2011 by Infinity Interactive, Inc.
70              
71             This is free software; you can redistribute it and/or modify it under
72             the same terms as the Perl 5 programming language system itself.
73              
74             =cut
75              
76             __END__