John Whitney has asked for the wisdom of the Perl Monks concerning the following question:
while ($client = $server->accept()) { $client->autoflush(1); $request = <$client>; $request =~ tr/\x0d\x0a//d; # Remove and CR's and LF's if ($request =~ m|^GET /(.*?)(\?(.*))? HTTP/1.[01]|) { # GET request print STDERR "GET request\n"; $page = uri_unescape($1); $querystring = uri_unescape($3); PROCESS_REQUEST (); } elsif ($request =~ m|^POST /(.*) HTTP/1.[01]|) { # POST request print STDERR "POST request\n"; $page = uri_unescape($1); # How to read in the POST's passed hidden variables here ? ? ? PROCESS_REQUEST (); } else { REDIRECT_TO_ERROR_PAGE ('Unprocessed request.'); } close($client); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Processing POST request in simple Windows server.
by BUU (Prior) on Oct 22, 2004 at 07:41 UTC | |
by inman (Curate) on Oct 22, 2004 at 11:31 UTC | |
|
Re: Processing POST request in simple Windows server.
by gothic_mallard (Pilgrim) on Oct 22, 2004 at 07:47 UTC | |
by John Whitney (Novice) on Oct 23, 2004 at 06:49 UTC | |
|
Re: Processing POST request in simple Windows server.
by DrHyde (Prior) on Oct 22, 2004 at 09:30 UTC | |
|
Re: Processing POST request in simple Windows server.
by Anonymous Monk on Oct 22, 2004 at 22:46 UTC |