bkiahg has asked for the wisdom of the Perl Monks concerning the following question:
use HTTP::Daemon; use HTTP::Status; require 'C:\\rrships\\default.cgi'; my $d = HTTP::Daemon->new(Listen => 5, LocalAddr => 'localhost', LocalPort => 80, Proto => 'tcp') or die "Can't bin +d : $@\n"; # print "Please contact me at: <URL:", $d->url, ">\n"; while (my $c = $d->accept) { while (my $r = $c->get_request) { # print $r->url->path . "\n"; if ($r->method eq 'GET') { my $response = HTTP::Response->new(200); $response->content(&Hello_World($r->url->path, $r->url-> +query)); $response->header("Content-Type" => "text/html"); $c->send_response($response); } else { $c->send_error(RC_FORBIDDEN) } } $c->close; undef($c); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTP::Daemon Security Question
by jeffa (Bishop) on Jan 06, 2009 at 17:38 UTC | |
by bkiahg (Pilgrim) on Jan 06, 2009 at 19:57 UTC | |
by jeffa (Bishop) on Jan 06, 2009 at 20:13 UTC | |
by bkiahg (Pilgrim) on Jan 06, 2009 at 20:43 UTC | |
|
Re: HTTP::Daemon Security Question
by zentara (Cardinal) on Jan 06, 2009 at 17:28 UTC | |
by Crackers2 (Parson) on Jan 06, 2009 at 18:12 UTC | |
by fullermd (Vicar) on Jan 06, 2009 at 19:52 UTC | |
by bkiahg (Pilgrim) on Jan 06, 2009 at 20:01 UTC | |
|
Re: HTTP::Daemon Security Question
by eye (Chaplain) on Jan 07, 2009 at 08:34 UTC |