]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix a bug in Bugzilla::API::Server::response_header(), see bug 1051056
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 9 Apr 2015 23:14:42 +0000 (01:14 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 9 Apr 2015 23:14:42 +0000 (01:14 +0200)
Bugzilla/API/Server.pm

index c2682ab8a80246aa16e067231d97a87c027b22ac..439f6e743634db9d86286a2896780dd997664633 100644 (file)
@@ -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();