From: Frédéric Buclin Date: Thu, 9 Apr 2015 23:14:42 +0000 (+0200) Subject: Fix a bug in Bugzilla::API::Server::response_header(), see bug 1051056 X-Git-Tag: release-5.1.1~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2149ec1518cb5051d9410248a1dde91490c6576d;p=thirdparty%2Fbugzilla.git Fix a bug in Bugzilla::API::Server::response_header(), see bug 1051056 --- 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();