[Melbourne-pm] HTTP server-like module?
melbourne-pm at mjch.net
Wed Nov 26 20:43:11 PST 2008
On Thu, 27 Nov 2008 14:12:30 +1100, "Toby Corkindale"
<toby.corkindale at strategicdata.com.au> said:
> > From my understandong of it, these are for handing data around between
> > objects but don't to any parsing themselves ...
> use IO::Socket::INET;
> use HTTP::Request;
> my $sock = IO::Socket::INET->new(LocalPort => 'http');
> # etc
> my $bytes = $sock->read(.....);
> my $request = HTTP::Request->parse($bytes);
> my $user_agent = $request->headers->('UserAgent');
huh ... well, colour me interesting shades of embarrassment ...
for some reason I had assumed it didn't handle the GET/POST line which
is what I wanted ...
carry on all, I obviously don't know what I'm talking about ... :)
Malcolm Herbert This brain intentionally
mjch at mjch.net left blank
More information about the Melbourne-pm