[Catalyst-dev] IO bug in Catalyst refactored

Dan Kubb dan.kubb at autopilotmarketing.com
Mon Sep 19 11:06:05 CEST 2005

Hi All,

I found a bug in the way Catalyst refactored reads in the message

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.




Dan Kubb                  Email: dan.kubb at autopilotmarketing.com
Autopilot Marketing Inc.  Phone: 1 (604) 820-0212
                             Web: http://www.autopilotmarketing.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: socket.pl
Type: text/x-perl-script
Size: 692 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst-dev/attachments/20050919/26f8be58/socket.bin

More information about the Catalyst-dev mailing list