From c15ff697b26b7f850b47cff29026b41935896c15 Mon Sep 17 00:00:00 2001 From: allter Date: Tue, 2 Jun 2015 18:43:40 +0300 Subject: [PATCH] Create new CGI::PSGI object unconditionally in psgi_app() This fix for bug https://rt.cpan.org/Public/Bug/Display.html?id=88506. It allows to process correctly multiple requests to apps derived from CGI::Application in a Plack/PSGI environment. --- lib/CGI/Application.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CGI/Application.pm b/lib/CGI/Application.pm index 22f8fec..59e3edd 100644 --- a/lib/CGI/Application.pm +++ b/lib/CGI/Application.pm @@ -244,10 +244,10 @@ sub psgi_app { return sub { my $env = shift; - if (not defined $args_to_new->{QUERY}) { + #if (not defined $args_to_new->{QUERY}) { require CGI::PSGI; $args_to_new->{QUERY} = CGI::PSGI->new($env); - } + #} my $webapp = $class->new($args_to_new); return $webapp->run_as_psgi;