Bugzilla – Attachment 74519 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.25 KB, created by
Julian Maurice
on 2018-04-19 06:49:50 UTC
(
hide
)
Description:
Bug 20582: Enable SetEnv middleware in bin/koha.psgi
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-04-19 06:49:50 UTC
Size:
1.25 KB
patch
obsolete
>From 13c809d886ea6e43eff9aba83585afc876d2c019 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 >--- > 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.14.2
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