[Catalyst] Bug with POSTs using cat 5.7007, and parse_on_demand = 1

Mark Zealey mark at itsolve.co.uk
Sat May 19 00:41:57 GMT 2007


After spending the past two hours looking through code etc, I finally 
discovered this was a bug of my own making. Basically, I've written a custom 
little FormBuilder controller module that loads .pm files with formbuilder 
specs. As part of that, it specified that it wanted { params => $c->req }, 
which wouldn't normally be a problem except that then in the base class, I do 
a Hash::Merge with some other values that I want. This by default does a 
Clone on the hashes, hence cloning $c->req. This meant that $c->req->{_body} 
was read in the cloned version when ->param was called, but it was then 
called again in the non-cloned version which caused it to want to read the 
data again. Pfew!

Mark

On Friday 18 May 2007 10:24 pm, Andy Grundman wrote:
> One more thing, can you set the environment variable
> CATALYST_HTTP_DEBUG=1 and then run through your bad POST?  This
> should give some helpful info.
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list