cormanaz has asked for the wisdom of the Perl Monks concerning the following question:
But when I call it with something like http://localhost:8080/test.cgi?foo=bar I get nothing in the $query object. Same if I initialize CGI with no parameter. If I look at, for example, $r->as_string the GET string is there, so I'm not sure what I'm doing wrong.use HTTP::Daemon; use HTTP::Status; use CGI; my $d = HTTP::Daemon->new(LocalPort => 8080) || die; while (my $c = $d->accept) { while (my $r = $c->get_request) { my $query = new CGI($r->content); my $junk = 1; $c->send_error(RC_FORBIDDEN) } $c->close; undef($c); }
TIA...
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using HTTP::Daemon with CGI
by Errto (Vicar) on Apr 13, 2007 at 20:47 UTC | |
by cormanaz (Deacon) on Apr 13, 2007 at 21:10 UTC |