summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-10-14 14:06:03 +0200
committerfranck cuny <franck@lumberjaph.net>2010-10-14 14:06:03 +0200
commitcd8179cc8917658dd05ea4e542a531f5ccdc75ce (patch)
treec0bbb7d0c1a984d73cb8bc8678ec2fe3becc4a61
parentdist.ini file and basic test for format::autho (diff)
downloadnet-http-spore-cd8179cc8917658dd05ea4e542a531f5ccdc75ce.tar.gz
use utf8
-rw-r--r--lib/Net/HTTP/Spore/Middleware/Format/JSON.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm b/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm
index 3fe54de..361ae3f 100644
--- a/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm
+++ b/lib/Net/HTTP/Spore/Middleware/Format/JSON.pm
@@ -10,13 +10,13 @@ has _json_parser => (
     is      => 'rw',
     isa     => 'JSON',
     lazy    => 1,
-    default => sub { JSON->new->allow_nonref },
+    default => sub { JSON->new->utf8(1)->allow_nonref },
 );
 
 sub encode       { $_[0]->_json_parser->encode( $_[1] ); }
 sub decode       { $_[0]->_json_parser->decode( $_[1] ); }
 sub accept_type  { ( 'Accept' => 'application/json' ) }
-sub content_type { ( 'Content-Type' => 'application/json' ) }
+sub content_type { ( 'Content-Type' => 'application/json;' ) }
 
 1;