I pushed an updated version here:
http://git.rubini.us/?p=code;a=blob;f=lib/mongrel/http11_parser.rb.rl;h=60c8f3d2519dc1673ef0b4107d40a9df9eca0662;hb=7d246b17efc0ac37db6c241729f6b0e298f49950
It's now confirmed working with Mongrel::HttpServer on Rubinius with a "Hello, world!" Mongrel::HttpHandler.
It can be used to generate a goto-driven FSM using Rubinius assembly:
http://git.rubini.us/?p=code;a=blob;f=lib/mongrel/http11.rb;h=435f643ea105f7adc486dc06ab960392c3dfeab5;hb=7d246b17efc0ac37db6c241729f6b0e298f49950
Some performance figures:
MRI + C extension, parsing 10,000 requests:
0.150000 0.000000 0.150000 ( 0.152268)
Rubinius + Rubinius.asm parser, parsing 10,000 requests:
20.500086 0.000000 20.500086 ( 20.500085)
So, presently ~135x slower than the C extension on MRI :)
--
Tony Arcieri
medioh.com