Subject: | Wrong Content-Length error |
we receive daily ~20 errors with Wrong Content-Length (paranoia against wrong Content-Length header) error message.
I added some debug messages and every error we got there is the body empty. So the client tell length is X and did not send any body. It would be nice if that special case can be checked befor someone goes paranoia :)
I added some debug messages and every error we got there is the body empty. So the client tell length is X and did not send any body. It would be nice if that special case can be checked befor someone goes paranoia :)
Subject: | Catalyst-Engine.patch |
--- Engine.pm.orig 2009-12-30 10:58:53.000000000 +0100
+++ Engine.pm 2009-12-30 11:02:29.000000000 +0100
@@ -347,8 +347,10 @@
my $remaining = $length - $self->read_position;
if ( $remaining > 0 ) {
$self->finalize_read($c);
- Catalyst::Exception->throw(
- "Wrong Content-Length value: $length" );
+ if( $self->read_position > 0 ) {
+ Catalyst::Exception->throw(
+ "Wrong Content-Length value: $length" );
+ }
}
}
else {