From 2149ec1518cb5051d9410248a1dde91490c6576d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Fri, 10 Apr 2015 01:14:42 +0200 Subject: [PATCH] Fix a bug in Bugzilla::API::Server::response_header(), see bug 1051056 --- Bugzilla/API/Server.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bugzilla/API/Server.pm b/Bugzilla/API/Server.pm index c2682ab8a8..439f6e7436 100644 --- a/Bugzilla/API/Server.pm +++ b/Bugzilla/API/Server.pm @@ -121,8 +121,8 @@ sub response_header { # The HTTP body needs to be bytes (not a utf8 string) for recent # versions of HTTP::Message, but JSON::RPC::Server doesn't handle this # properly. $_[1] is the HTTP body content we're going to be sending. - if (utf8::is_utf8($_[2])) { - utf8::encode($_[2]); + if (utf8::is_utf8($result)) { + utf8::encode($result); # Since we're going to just be sending raw bytes, we need to # set STDOUT to not expect utf8. disable_utf8(); -- 2.47.2