Perl: the Markov chain saw | |
PerlMonks |
Check if a scalar contains a complete HTTP requestby FloydATC (Deacon) |
on May 20, 2017 at 09:25 UTC ( [id://1190708]=perlquestion: print w/replies, xml ) | Need Help?? |
FloydATC has asked for the wisdom of the Perl Monks concerning the following question: Esteemed monks, While reading from a non-blocking socket, I am trying to detect HTTP requests, complete with any POST data, within a scalar. My first thought was to use HTTP::Request but it seems the ->parse() method will rather return an incomplete/invalid request than fail, and partial requests ruin everything. As of now, I've been manually parsing content-length and chunked transfer encoding, but this is both slow and error-prone so I'd much rather lean on someone with broader experience than myself. Any thoughts?
-- FloydATC
I got 99 problems, most of them have to do with printers.
Back to
Seekers of Perl Wisdom
|
|