From 5f47b4e34b1610408a2c1ddcc57390c04baed6f8 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 Signed-off-by: Josef Moravec --- 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.11.0