[Catalyst] Bug with POSTs using cat 5.7007, and parse_on_demand = 1
Mark Zealey
mark at itsolve.co.uk
Fri May 18 22:06:33 GMT 2007
Hi,
I have found a bug with catalyst, when Catalyst::Engine::HTTP is used with
parse_on_demand set to true, and POST content. when I post, the
connection 'hangs'. if i hit esc in the browser, I get the following cat
output:
Can't call FIRSTKEY method on handle DBI::db=HASH(0x9858670) after
take_imp_data() at /usr/lib/perl5/site_perl/5.8.8/Data/Dump.pm line 251.
Can't call FIRSTKEY method on handle DBI::db=HASH(0x984a6ec) after
take_imp_data() at /usr/lib/perl5/site_perl/5.8.8/Data/Dump.pm line 251.
[info] *** Request 1 (0.200/s) [17010] [Fri May 18 21:59:01 2007] ***
[debug] "POST" request for "wedding/invite/add" from "127.0.0.1"
[debug] Path is "wedding/invite/add"
[debug] Found sessionid "6b7b217cfca6320d5f6579dbe7b4087ce8102acb" in cookie
[debug] Restored session "6b7b217cfca6320d5f6579dbe7b4087ce8102acb"
[debug] Body Parameters are:
.-------------------------------------+--------------------------------------.
| Parameter | Value |
+-------------------------------------+--------------------------------------+
| _submit | Add new invite |
| _submitted_invite | 1 |
| address | |
| email | |
| invited | 0 |
| known_by | 639359 |
| name | blah |
| type | service |
'-------------------------------------+--------------------------------------'
[error] Caught exception in Wedding::Controller::Root->end "Wrong
Content-Length value: 107 at /usr/lib/perl5/site_perl/5.8.8/Catalyst.pm line
1611"
[debug] Found sessionid "6b7b217cfca6320d5f6579dbe7b4087ce8102acb" in cookie
[debug] Restored session "6b7b217cfca6320d5f6579dbe7b4087ce8102acb"
[debug] Redirecting to "http://localhost:3000/wedding/invite/view"
[info] Request took 5.621478s (0.178/s)
.----------------------------------------------------------------+-----------.
| Action | Time |
+----------------------------------------------------------------+-----------+
| /auto | 0.263820s |
| /wedding/auto | 0.000924s |
| /wedding/invite/add | 0.171354s |
| /end | 4.483848s |
'----------------------------------------------------------------+-----------'
The FIRSTKEY stuff is some tied hash access to DBI (keys or something), and
I'm not sure why it is saying 'Wrong content-length value' - this is perhaps
the key to the error? When I run the server under perl -d, and hit ^C when
it's hanging, it shows it being this:
Catalyst::Engine::HTTP::read_chunk(/usr/lib/perl5/site_perl/5.8.8/Catalyst/Engine/HTTP.pm:131):
131: my $rc = *STDIN->sysread(@_);
I guess cat is mis-parsing the amount of data that it expects from the POST
command? When i turn parse_on_demand off, it all works fine...
Mark
More information about the Catalyst
mailing list