Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

acme
  (email not shown publicly)
http://www.astray.com/

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Saturday January 05, 2008
01:45 PM

HTTP Parser

[ #35298 ]
Dear Lazyweb, please write a XS module which interfaces to Mongrel's HTTP Parser (also seen in Thin). I'll buy you dimsum!
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Hmm, I might take a crack at it.

    That state language compiler sure generates some nasty C code though!
  • Has an XS HTTP Header parser on CPAN.
    • Yeah I looked at that once, but it doesn't give you an HTTP::Request object or anything nice like that.

      What we also need is a fast HTTP body parser in C, our HTTP::Body module in Catalyst is really slow for doing things like multipart body parsing. Haven't looked at Mongrel enough yet to know if it does body parsing or just headers.
  • I wrote a quick XS wrapper for benchmark purposes and for parsing a real-world header, here are the results.

                      Rate http-parser-xs        perlbal
    http-parser-xs 55582/s             --           -12%
    perlbal        63509/s            14%             --

    This is just raw parsing speed, n