[Catalyst] [PATCH] wrong Content-Length and POST request
    Matt S Trout 
    dbix-class at trout.me.uk
       
    Sat Jan 28 17:08:03 CET 2006
    
    
  
On Fri, Jan 27, 2006 at 03:14:54PM -0800, Tatsuhiko Miyagawa wrote:
> Hi,
> 
> I found a possible bug in Catalyst, where it accepts POST requests
> with wrong Content-Length value and subsequent POST requests will all
> fail.
> 
> Use case is:
> 
> * User A uploads a photo (more than 4k) with a wrong Content-Length
> header (possibly by manually munging the header)
> * User B uploads a photo (more than 4k) with correct Content-Length header
> 
> then request of  User A succeeds and User B fails, which is not desirable.
> 
> Attached is a patch to fix this and test case to verify that.
> t/catalyst_130pix.gif is taken from
> http://catalyst.perl.org/images/layout/catalyst_130pix.gif. This
> should be whatever binary file which is more than 4096 bytes (=
> $Catalyst::Engine::CHUNKSIZE).
Thanks, applied.
-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information
 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
    
    
More information about the Catalyst
mailing list