From: Marius Gavrilescu Date: Sat, 27 Feb 2016 18:28:05 +0000 (+0000) Subject: Only add footer to successful requests X-Git-Tag: 0.000_003~4 X-Git-Url: http://git.ieval.ro/?p=app-web-oof.git;a=commitdiff_plain;h=fb23ef22a984edea290b1d2f22a5bd5fb5ce09af Only add footer to successful requests --- diff --git a/lib/App/Web/Oof.pm b/lib/App/Web/Oof.pm index 429c97f..471c200 100644 --- a/lib/App/Web/Oof.pm +++ b/lib/App/Web/Oof.pm @@ -231,7 +231,7 @@ sub app { my $app = shift; sub { my $res = $app->(@_); - push @{$res->[2]}, $footer; + push @{$res->[2]}, $footer if $res->[0] == 200; $res; } };