X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=17d198d74b976fcb95397f5e34214999365756bf;hb=cf4801bd15e923b59c8f3760c17606b8f0e3b552;hp=af1eb781135205f798ebdbb9b1e9fc98dd1922ed;hpb=d3892d73af078012472db7cf81a4cba4015d36b4;p=gruntmaster-page.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index af1eb78..17d198d 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -126,11 +126,11 @@ sub dispatch_request{ }, sub (?:format~) { - my $format = lc $_{format} // ''; + my $format = lc ($_{format} // ''); response_filter { my ($r) = @_; return $r if ref $r ne 'Plack::App::Gruntmaster::Response'; - return [200, ['Content-Type' => 'application/json', 'X-Forever' => 1], [encode_json $r->{params}]] if $format eq 'json'; + return [200, ['Content-Type' => 'application/json'], [encode_json $r->{params}]] if $format eq 'json'; my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}}; [200, ['Content-Type' => 'text/html'], [encode 'UTF-8', $ret]] },