]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1645455 - Can't attach some text, 500 internal server error
authordklawren <dklawren@users.noreply.github.com>
Fri, 12 Jun 2020 20:19:23 +0000 (16:19 -0400)
committerGitHub <noreply@github.com>
Fri, 12 Jun 2020 20:19:23 +0000 (16:19 -0400)
Bugzilla/S3.pm

index ceb1451fadf16b5a07425db19331f572a3eb6340..3a50ce360b887a4341d90ff7a7d0d6ed53eb3ed2 100644 (file)
@@ -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;