From 11a991575fb726a5498c34051426a875244324f2 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 24 Jun 2015 09:47:49 +0200 Subject: [PATCH] Bug 13799: Force UTF-8 charset in responses --- Koha/REST/V1.pm | 3 +++ api/v1/script.cgi | 0 2 files changed, 3 insertions(+) mode change 100644 => 100755 api/v1/script.cgi diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm index 3becf12..39cdab9 100644 --- a/Koha/REST/V1.pm +++ b/Koha/REST/V1.pm @@ -16,6 +16,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.9.1