Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is this the famous Windows CRLF problem or mine? Thanks in advance. Thomasuse strict; use CGI; use HTTP::Daemon; use HTTP::Status; my ($HOST) = $ENV{SERVER_NAME} =~ /(.*)/s; # untaint my $PORT = 1234; my $d = new HTTP::Daemon(LocalAddr=>$HOST,LocalPort=>$PORT,Reuse=>1); print "Please contact me at: <URL:" . $d->url . ">\n"; while (my $c = $d->accept) { while (my $r = $c->get_request) { if ($r) { my $query = new CGI $r->content; $c->send_basic_header; print $c $query->header; print $c $query->start_html; print $c $query->start_form(-enctype=>$query->MULTIPART); print $c $query->textfield("yourname"); print $c $query->submit("Go"); print $c $query->end_form; if ($query->param('yourname')) { print $c "hello "; print $c $query->param('yourname'); print $c " ... !"; } print $c $query->Dump; print $c $query->end_html; close $c; } else { $c->send_error(RC_FORBIDDEN) } } $c->close; undef($c); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTP Daemon with multipart form on Windows problem
by Aristotle (Chancellor) on May 30, 2002 at 13:55 UTC |