httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@rahul.net (Jeff Lacki)
Subject Re: [users@httpd] POST turns into GET problem
Date Mon, 29 Sep 2003 05:28:45 GMT
Yes, you get the same error.  The perl file is as follows
(and works just fine on the local apache server):

#!/usr/bin/perl -w
#
# mil_civ.pl
#
# Switches which direction the questions should take based on 2 radio
# buttons for input
# Displays: MilitaryConsentForm.htm
#--------------------------------------------------------------------

use strict;

my $BASE;
BEGIN {
    $BASE="/var/www";
}
use lib "$BASE/perl_inc";

require "fileIO.pl";
require "html_utils.pl";
require "gen_numbers.pl";
require "ptsd.pl";
require "http.pl";

# setup variables we will use here
my $HTML_DIR="/var/www/ptsdsurvey";
my $MILITARY_FILE="$HTML_DIR/MilitaryConsentForm.htm";
my $CIVILIAN_FILE="$HTML_DIR/CivilianConsentForm.htm";

# set the MIME header
print "Content-type: text/html\r\n\r\n";

if ($ENV{'REQUEST_METHOD'} eq "POST") {
    read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
}
else {
    my $meth = $ENV{'REQUEST_METHOD'};
    print STDERR "ERROR: Method Error ($meth)\n";
    errhtml("Method Error ($meth)");
    exit 1;
}

thats the beginning of it.  Ive also tried saying:
if ($ENV{'REQUEST_METHOD'} =~ /POST/i) {

with the same results...and the err log:

[Sun Sep 28 21:57:22 2003] [error] [client 64.81.32.15] ERROR: Method Error, expected POST,
got (GET), referer: http://66.87.83.15/


Jeff


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message