Skip Menu |

This queue is for tickets about the CGI-Application CPAN distribution.

Report information
The Basics
Id: 88506
Status: open
Priority: 0/
Queue: CGI-Application

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 4.50
Fixed in: (no value)



Subject: CGI::Application->psgi_app caches query object (broken)
If as mentioned in [href://https://rt.cpan.org/Public/Bug/Display.html?id=72909|Bug #72909 for CGI-Application: persistence issues] CGI::Application is designed to have a new object created on each request. then psgi_app, for it to be useful (for runmode to change so its not always the default one), psgi_app needs to create a new CGI::PSGI object every time and not cache the old one, like this sub psgi_app { my $class = shift; my $args_to_new = shift; return sub { my $env = shift; require CGI::PSGI; $args_to_new->{QUERY} = CGI::PSGI->new($env); my $webapp = $class->new($args_to_new); return $webapp->run_as_psgi; } } Thanks for listening
Subject: Re: [rt.cpan.org #88506] CGI::Application->psgi_app caches query object (broken)
Date: Sun, 08 Sep 2013 16:41:23 -0700
To: noreply via RT <bug-CGI-Application [...] rt.cpan.org>
From: Mark Stosberg <mark [...] stosberg.com>
On Sun, Sep 8, 2013, at 02:02 PM, noreply via RT wrote: Show quoted text
> Sun Sep 08 17:02:07 2013: Request 88506 was acted upon. > Transaction: Ticket created by b244145@tyldd.com > Queue: CGI-Application > Subject: CGI::Application->psgi_app caches query object (broken) > Broken in: 4.50 > Severity: (no value) > Owner: Nobody > Requestors: > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88506 > > > > > If as mentioned in > [href://https://rt.cpan.org/Public/Bug/Display.html?id=72909|Bug #72909 > for CGI-Application: persistence issues] > CGI::Application is designed to have a new object created on each > request. > then psgi_app, for it to be useful (for runmode to change so its not > always the default one), > psgi_app needs to create a new CGI::PSGI object every time > and not cache the old one, like this > > sub psgi_app { > my $class = shift; > my $args_to_new = shift; > return sub { > my $env = shift; > require CGI::PSGI; > $args_to_new->{QUERY} = CGI::PSGI->new($env); > my $webapp = $class->new($args_to_new); > return $webapp->run_as_psgi; > } > } > > Thanks for listening
Thanks for the report. We'll take a look
From: allter [...] gmail.com
Hello! Вск Сен 08 19:41:37 2013, mark@stosberg.com писал: Show quoted text
> > > On Sun, Sep 8, 2013, at 02:02 PM, noreply via RT wrote:
> > Sun Sep 08 17:02:07 2013: Request 88506 was acted upon. > > Transaction: Ticket created by b244145@tyldd.com > > Queue: CGI-Application > > Subject: CGI::Application->psgi_app caches query object (broken) > > Broken in: 4.50 > > Severity: (no value) > > Owner: Nobody > > Requestors: > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88506 > > > > > > > > > If as mentioned in > > [href://https://rt.cpan.org/Public/Bug/Display.html?id=72909|Bug #72909 > > for CGI-Application: persistence issues] > > CGI::Application is designed to have a new object created on each > > request. > > then psgi_app, for it to be useful (for runmode to change so its not > > always the default one), > > psgi_app needs to create a new CGI::PSGI object every time > > and not cache the old one, like this > > > > sub psgi_app { > > my $class = shift; > > my $args_to_new = shift; > > return sub { > > my $env = shift; > > require CGI::PSGI; > > $args_to_new->{QUERY} = CGI::PSGI->new($env); > > my $webapp = $class->new($args_to_new); > > return $webapp->run_as_psgi; > > } > > } > > > > Thanks for listening
> > Thanks for the report. We'll take a look
And what about this issue? I've ran into the same problem: I ran my CGI::Application app from plackup and I had my POST form data being the same each request. I agree with "b244145 [...] tyldd.com" that CGI::App should create new CGI::PSGI object unconditionally.
Subject: Re: [rt.cpan.org #88506] CGI::Application->psgi_app caches query object (broken)
Date: Tue, 2 Jun 2015 16:37:29 +0100
To: bug-CGI-Application [...] rt.cpan.org
From: Martin McGrath <mcgrath.martin [...] gmail.com>
On 2 June 2015 at 16:27, Andrey M. Smirnov via RT <bug-CGI-Application@rt.cpan.org> wrote: Show quoted text
> Queue: CGI-Application > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88506 > > > Hello! > > Вск Сен 08 19:41:37 2013, mark@stosberg.com писал:
>> >> >> On Sun, Sep 8, 2013, at 02:02 PM, noreply via RT wrote:
>> > Sun Sep 08 17:02:07 2013: Request 88506 was acted upon. >> > Transaction: Ticket created by b244145@tyldd.com >> > Queue: CGI-Application >> > Subject: CGI::Application->psgi_app caches query object (broken) >> > Broken in: 4.50 >> > Severity: (no value) >> > Owner: Nobody >> > Requestors: >> > Status: new >> > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88506 > >> > >> > >> > >> > If as mentioned in >> > [href://https://rt.cpan.org/Public/Bug/Display.html?id=72909|Bug #72909 >> > for CGI-Application: persistence issues] >> > CGI::Application is designed to have a new object created on each >> > request. >> > then psgi_app, for it to be useful (for runmode to change so its not >> > always the default one), >> > psgi_app needs to create a new CGI::PSGI object every time >> > and not cache the old one, like this >> > >> > sub psgi_app { >> > my $class = shift; >> > my $args_to_new = shift; >> > return sub { >> > my $env = shift; >> > require CGI::PSGI; >> > $args_to_new->{QUERY} = CGI::PSGI->new($env); >> > my $webapp = $class->new($args_to_new); >> > return $webapp->run_as_psgi; >> > } >> > } >> > >> > Thanks for listening
>> >> Thanks for the report. We'll take a look
> > > And what about this issue? > > I've ran into the same problem: I ran my CGI::Application app from plackup and I had my POST form data being the same each request. > > I agree with "b244145 [...] tyldd.com" that CGI::App should create new CGI::PSGI object unconditionally.
Thanks for getting in touch. I'm working on a new build focusing on incorporating some older pull requests and addressing a security related bug. I hope to have an updated release in the near future. Once released I'll review and address the outstanding tickets. Thanks Martin
From: allter [...] gmail.com
Втр Июн 02 11:37:45 2015, MARTO писал: Show quoted text
> Thanks for getting in touch. I'm working on a new build focusing on > incorporating some older pull requests and addressing a security > related bug.
Thank you for your efforts! I've created a trivial pull request for you convenience: https://github.com/markstos/CGI--Application/pull/17
Subject: Re: [rt.cpan.org #88506] CGI::Application->psgi_app caches query object (broken)
Date: Tue, 2 Jun 2015 16:51:52 +0100
To: bug-CGI-Application [...] rt.cpan.org
From: Martin McGrath <mcgrath.martin [...] gmail.com>
On 2 June 2015 at 16:51, Andrey M. Smirnov via RT <bug-CGI-Application@rt.cpan.org> wrote: Show quoted text
> Queue: CGI-Application > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88506 > > > Втр Июн 02 11:37:45 2015, MARTO писал: >
>> Thanks for getting in touch. I'm working on a new build focusing on >> incorporating some older pull requests and addressing a security >> related bug.
> > Thank you for your efforts! > > I've created a trivial pull request for you convenience: > https://github.com/markstos/CGI--Application/pull/17
Many thanks. Martin