[Catalyst-dev] IO bug in Catalyst refactored

Sebastian Riedel sri at oook.de
Mon Sep 19 13:04:20 CEST 2005

Am 19.09.2005 um 11:06 schrieb Dan Kubb:

> Hi All,
> I found a bug in the way Catalyst refactored reads in the message
> body.
> If the client isn't quick enough at sending the message body after
> the headers the entire body will be skipped over and ignored.
> I found this problem while running the HTTP Engine, but it may
> affect all the engines, since the bug is in the core Engine
> prepare_body() method.
> Attached to this email is a simple program that demonstrates
> the problem.
> To use this program, just:
>   1. Modify the path (and possibly port) to a running instance
>      of Catalyst running in Debug mode.
>   2. Execute the program and note that the Body parameters will
>      not be read.. nothing will be shown in the Debug logs.
>   3. Comment out the sleep on line 21, and re-run the program.
>      The message Body parameters will most likely be read
>      and shown in the Debug logs.
> I don't have a bug fix to Catalyst, since I rarely do raw IO
> stuff -- I did try playing around with using IO::Select's
> can_read within C::E::prepare_body(), but I didn't have any
> luck getting it to work properly.

Yes this stuff is very tricky, i already experimented with timeouts,  
but those won't wait longer than your 5 seconds by default...
Btw. Kudos to you for testing the new features!


More information about the Catalyst-dev mailing list