Subject: | CGI::Fast: -oldstyle_urls doesn't work |
the method query_string returns the query with semicolons instead of
ampersands inbetween parameters despite the -oldstyle_urls option.
See attached minimal testcase (run it as fastcgi) that shows this bug.
There is also some faulty documentation in CGI.pm 3.29 - it states
"
You can also retrieve the unprocessed query string with
query_string():
$the_string = query_string;
"
However, the query string returned not unprocessed.
Workaround: Use $ENV{QUERY_STRING} instead of $query->query_string()
Subject: | cgifast_oldstyle_urls_test1.pl |
#!/usr/bin/perl -T
use strict;
use warnings;
use CGI qw(-oldstyle_urls);
use CGI::Fast (-oldstyle_urls);
sub main {
while (my $q = CGI::Fast->new()) {
my $a = $q->query_string || '';
my $b = $ENV{QUERY_STRING} || '';
warn "DEBUG query_string() ='$a'\nDEBUG ENV=$b\n";
print $q->header("text/plain") . "testing.." . localtime();
}
}
main();
#eof