projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fddf958
)
Fix UTF-8 in JSON
author
Marius Gavrilescu
<marius@ieval.ro>
Fri, 12 Dec 2014 15:01:16 +0000
(17:01 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Fri, 12 Dec 2014 15:01:16 +0000
(17:01 +0200)
lib/Plack/App/Gruntmaster.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Plack/App/Gruntmaster.pm
b/lib/Plack/App/Gruntmaster.pm
index 4a89edab6ef3f34a3bbd3f48d023f2d53eada852..b84dc81db4b13bcf3ec79a3c65f18912d831233a 100644
(file)
--- a/
lib/Plack/App/Gruntmaster.pm
+++ b/
lib/Plack/App/Gruntmaster.pm
@@
-129,7
+129,7
@@
sub dispatch_request{
response_filter {
my ($r) = @_;
return $r if ref $r ne 'Plack::App::Gruntmaster::Response';
response_filter {
my ($r) = @_;
return $r if ref $r ne 'Plack::App::Gruntmaster::Response';
- return [200, ['Content-Type' => 'application/json', 'X-Forever' => 1], [encode
'UTF-8', encode
_json $r->{params}]] if $env->{HTTP_ACCEPT} =~ m,^\s*application/json\s*$,g;
+ return [200, ['Content-Type' => 'application/json', 'X-Forever' => 1], [encode_json $r->{params}]] if $env->{HTTP_ACCEPT} =~ m,^\s*application/json\s*$,g;
my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}};
[200, ['Content-Type' => 'text/html'], [encode 'UTF-8', $ret]]
},
my $ret = render $r->{template}, 'en', title => $r->{title}, %{$r->{params}};
[200, ['Content-Type' => 'text/html'], [encode 'UTF-8', $ret]]
},
This page took
0.010295 seconds
and
4
git commands to generate.