unless ($ENV{"REQUEST_METHOD"} eq "POST") { my $url_query_string = $ENV{'QUERY_STRING_UNESCAPED'}; $url_query_string =~ s§\\§§g; $url_query_string =~ m§poll_id\=([\d_]+)§; my $poll_id = $1; $ENV{'QUERY_STRING'}=~ m§poll_id\=([\d_]+)§; my $ssi_poll_id = $1; # if there is a dicrepancy between the two query string vars, and # there is actually something in # ENV{'QUERY_STRING_UNESCAPED'}, it's because the cgi is called as an SSI, # but with arguments on the url, # and then we want CGI to use those instead # "not $cgi_parameters" below handles if we get params from a test harness script if ($url_query_string and $url_query_string ne $ENV{'QUERY_STRING'} and not $cgi_parameters and $poll_id eq $ssi_poll_id) { $cgi_parameters = $url_query_string; } } my $q = new CGI($cgi_parameters);