What I am attempting to do, is do a server side "form action" redirect based on a
regex on a field from the form.
It now seems that this is just going to POST the form data, and leave the user
hanging.
Is HTTP::Request the best way to direct the user and the form data to the appropriate
page?
This is a vary slightly modified version of the example in the docs, and yet it
returns no more data than this in my log, though the script is chmod'd 755 :
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end of script
headers: /var/cgi-bin/parse.cgi
Any help with what might be missing would be great
Here is the script:
#!/usr/bin/perl -wT
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
my $ua = LWP::UserAgent->new;
if ($q->param("domain") =~ /\.ca$/) {
$ua->request(POST 'https://domains/perl/ca_reg.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
} else {
$ua->request(POST 'https://domains/perl/reg_system.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
}
Please do not hesitate to contact me directly if you have any more questions!
Cheers,
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com
* Manage Your Account Online !
Pacific Online Control Panel http://www.pacificonline.com/customer_support
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]