From: dklawren Date: Fri, 12 Jun 2020 20:19:23 +0000 (-0400) Subject: Bug 1645455 - Can't attach some text, 500 internal server error X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d62af46d601c5e091c5d1844358c87a28abf196b;p=thirdparty%2Fbugzilla.git Bug 1645455 - Can't attach some text, 500 internal server error --- 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;