exilepanda has asked for the wisdom of the Perl Monks concerning the following question:
My simulation module is simply to set $ENV{REQUEST_METHOD} = "GET" and then $ENV{QUERY_STRING} = "Var1=Val1&Var2=Val2" (when I run the code in shell) Now the GET request is done, but the POST request won't work as it read (STDIN, my $buf, 4096) and I can't find anyway to feed the STDIN
My recent shortcoming approach it to alter a POST request to GET and URI encode the data string, it works on some cases, however it won't pass through when somecgi.pl performs :
Any clues for this ? Thanks a lot!if ( $ENV{REQUEST_METHOD} eq "GET" ) { print_the_form(); } elsif ( $ENV{REQUEST_METHOD} eq "POST" ) { handle_the_form(); } else { print "GET and POST request only" }
|
|---|