diff options
Diffstat (limited to 'lib/TUWF/Response.pm')
-rw-r--r-- | lib/TUWF/Response.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/TUWF/Response.pm b/lib/TUWF/Response.pm index bef3648..aa78efb 100644 --- a/lib/TUWF/Response.pm +++ b/lib/TUWF/Response.pm @@ -190,8 +190,8 @@ sub resJSON { croak "Unable to load JSON::XS, is it installed?\n" unless eval { require JSON::XS; 1 }; - $self->resInit; - $self->resHeader('Content-Type' => 'application/json'); + $self->resHeader('Content-Type' => 'application/json; charset=UTF-8'); + $self->resBuffer('clear'); my $fd = $self->resFd(); print $fd JSON::XS::encode_json($obj); } |