From 09dbecae883c31bf0fde6c4e7af2a592e2c1414d Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 31 Oct 2018 10:44:12 +0100 Subject: [PATCH] Bug 20582: Handle multipart content-type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mojo::Message::Request's body attribute does not contain anything when the content-type is multipart/* We have to rebuild the multipart body for CGI scripts Test plan: 1. Go to Tools ยป Upload and try to upload a file --- Koha/App/Plugin/CGIBinKoha.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/App/Plugin/CGIBinKoha.pm b/Koha/App/Plugin/CGIBinKoha.pm index 05e89457c2..19f9fac9c2 100644 --- a/Koha/App/Plugin/CGIBinKoha.pm +++ b/Koha/App/Plugin/CGIBinKoha.pm @@ -56,7 +56,7 @@ sub _psgi_env { my $env = $c->req->env; - my $body = $c->req->body; + my $body = $c->req->build_body; $env = { %$env, 'psgi.input' => IO::Scalar->new(\$body), -- 2.17.1