The problem I have with this code is that requests can trigger an error on
demand. Errors eventually trigger an email to a bunch of people. But it's
for an error nobody can fix.
# paranoia against wrong Content-Length header
my $remaining = $length - $self->read_position;
if ( $remaining > 0 ) {
$self->finalize_read($c);
Catalyst::Exception->throw(
"Wrong Content-Length value: $length" );
}
Shouldn't that just return 411, 413, or just a 400?
And then there's:
eval {
....
};
if ( my $error = $@ ) {
chomp $error;
$class->log->error(qq/Caught exception in engine "$error"/);
}
Should check return value from eval instead.
--
Bill Moseley
[email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/