X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Fhttp_method.t;h=039d94f4b8b668f122ad54c3922de439c43280d7;hp=797c807717fd7645dd5fd207a9b9b3853086ef98;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hpb=9868e0a0023cc8b598d60f150ea367e0056a65f3 diff --git a/t/http_method.t b/t/http_method.t index 797c807..039d94f 100644 --- a/t/http_method.t +++ b/t/http_method.t @@ -50,23 +50,23 @@ __END__ use Catalyst; use HTTP::Headers::ActionPack; - + my $cn = HTTP::Headers::ActionPack->new ->get_content_negotiator; - + sub Catalyst::Response::format { my $self = shift; my %formats = @_; my @formats = keys %formats; - + my $accept = $self->_context->req->header('Accept') || $format{default} || $_[0]; - + $self->headers->header('Vary' => 'Accept'); $self->headers->header('Accepts' => (join ',', @formats)); - + if(my $which = $cn->choose_media_type(\@formats, $accept)) { $self->content_type($which); if(my $possible_body = $formats{$which}->($self)) { @@ -74,7 +74,7 @@ __END__ } } else { $self->status(406); - $self->body("Method Not Acceptable"); + $self->body("Method Not Acceptable"); } }