[Catalyst] [PATCH] wrong Content-Length and POST request

Tatsuhiko Miyagawa miyagawa at gmail.com
Sat Jan 28 00:14:54 CET 2006


I found a possible bug in Catalyst, where it accepts POST requests
with wrong Content-Length value and subsequent POST requests will all

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 (=

Tatsuhiko Miyagawa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: catalyst-upload.patch
Type: application/octet-stream
Size: 2572 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060127/3f55131a/catalyst-upload-0001.obj

More information about the Catalyst mailing list