From d62af46d601c5e091c5d1844358c87a28abf196b Mon Sep 17 00:00:00 2001 From: dklawren Date: Fri, 12 Jun 2020 16:19:23 -0400 Subject: [PATCH] Bug 1645455 - Can't attach some text, 500 internal server error --- Bugzilla/S3.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Bugzilla/S3.pm b/Bugzilla/S3.pm index ceb1451fa..3a50ce360 100644 --- a/Bugzilla/S3.pm +++ b/Bugzilla/S3.pm @@ -128,6 +128,12 @@ sub _make_request { } my $request = HTTP::Request->new($method, $url, $http_headers); + + # works only with bytes, not with UTF-8 strings. + if (utf8::is_utf8($data)) { + utf8::encode($data); + } + $request->content($data); # my $req_as = $request->as_string; -- 2.47.3