Commit 2149ec15 authored by Frédéric Buclin's avatar Frédéric Buclin

Fix a bug in Bugzilla::API::Server::response_header(), see bug 1051056

parent 3c7ab831
...@@ -121,8 +121,8 @@ sub response_header { ...@@ -121,8 +121,8 @@ sub response_header {
# The HTTP body needs to be bytes (not a utf8 string) for recent # 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 # 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. # properly. $_[1] is the HTTP body content we're going to be sending.
if (utf8::is_utf8($_[2])) { if (utf8::is_utf8($result)) {
utf8::encode($_[2]); utf8::encode($result);
# Since we're going to just be sending raw bytes, we need to # Since we're going to just be sending raw bytes, we need to
# set STDOUT to not expect utf8. # set STDOUT to not expect utf8.
disable_utf8(); disable_utf8();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment