From: Marius Gavrilescu Date: Sat, 21 Mar 2015 17:25:35 +0000 (+0200) Subject: Fix static mode X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=681c86fbb6f90fd8af8f5761d80c02922b6c7226;p=plack-app-gruntmaster.git Fix static mode --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index c9965d0..4830d4b 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -118,7 +118,7 @@ sub dispatch_request{ $vary .= ', Authorization' if $privacy eq 'private'; my @hdrs = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=$r->{maxage}", Vary => $vary); return [200, ['Content-Type' => 'application/json; charset=utf-8', @hdrs], [encode_json $r->{params}]] if $format eq 'json'; - my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}}, maybe static => $env->{HTTP_X_STATIC} + 1; + my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}}, maybe static => $env->{HTTP_X_STATIC}; [200, ['Content-Type' => 'text/html; charset=utf-8', @hdrs], [encode 'UTF-8', $ret]] }, },