From 97047c989286105ab472cdc05dc913b661406888 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 24 Jun 2015 09:47:49 +0200 Subject: [PATCH] Bug 13799: 3. Force UTF-8 charset in responses --- Koha/REST/V1.pm | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 api/v1/script.cgi diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm index 089461b..ea1810f 100644 --- a/Koha/REST/V1.pm +++ b/Koha/REST/V1.pm @@ -78,6 +78,9 @@ sub startup { } ); + # Force charset=utf8 in Content-Type header for JSON responses + $self->types->type(json => 'application/json; charset=utf8'); + $self->plugin(Swagger2 => { route => $route, url => $self->home->rel_file("api/v1/swagger.json"), diff --git a/api/v1/script.cgi b/api/v1/script.cgi old mode 100644 new mode 100755 -- 1.7.9.5