Bugzilla – Attachment 84528 Details for
Bug 20582
Turn Koha into a Mojolicious application
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20582: Enable SetEnv middleware in bin/koha.psgi
Bug-20582-Enable-SetEnv-middleware-in-binkohapsgi.patch (text/plain), 1.30 KB, created by
Josef Moravec
on 2019-01-30 14:46:13 UTC
(
hide
)
Description:
Bug 20582: Enable SetEnv middleware in bin/koha.psgi
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-01-30 14:46:13 UTC
Size:
1.30 KB
patch
obsolete
>From 5dd056ebbb152c073860f48388095ef8034b489c Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 19 Apr 2018 00:01:24 +0200 >Subject: [PATCH] Bug 20582: Enable SetEnv middleware in bin/koha.psgi > >and make sure the psgi env is passed to CGI scripts > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > Koha/App/Plugin/CGIBinKoha.pm | 5 ++++- > bin/koha.psgi | 2 ++ > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/App/Plugin/CGIBinKoha.pm b/Koha/App/Plugin/CGIBinKoha.pm >index 13f8a2857d..05e89457c2 100644 >--- a/Koha/App/Plugin/CGIBinKoha.pm >+++ b/Koha/App/Plugin/CGIBinKoha.pm >@@ -54,8 +54,11 @@ sub register { > sub _psgi_env { > my ($self, $c) = @_; > >+ my $env = $c->req->env; >+ > my $body = $c->req->body; >- my $env = { >+ $env = { >+ %$env, > 'psgi.input' => IO::Scalar->new(\$body), > 'psgi.errors' => *STDERR, > REQUEST_METHOD => $c->req->method, >diff --git a/bin/koha.psgi b/bin/koha.psgi >index 7857de3455..39a1002805 100755 >--- a/bin/koha.psgi >+++ b/bin/koha.psgi >@@ -7,6 +7,8 @@ use Mojo::Server::PSGI; > use Plack::Builder; > > builder { >+ enable '+Koha::Middleware::SetEnv'; >+ > my $server = Mojo::Server::PSGI->new; > $server->load_app("$FindBin::Bin/koha"); > $server->to_psgi_app; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20582
:
74173
|
74517
|
74518
|
74519
|
74520
|
79648
|
81687
|
81857
|
82423
|
84526
|
84527
|
84528
|
84529
|
84530
|
84531
|
91009
|
99267
|
103633
|
103720
|
103721
|
109282
|
109283
|
109284
|
109895
|
109896
|
109897
|
109898
|
109899
|
109900
|
111282
|
111315
|
111374