Weaver, Dave <davew@wsieurope.com>
Hello,
I found what appears to be a bug in CGI.pm
url() returns an incorrect url if there is a “+” in PATH_INFO
e.g:
correct: http://example.com/cgi/urltest/hello/world gives
url = http://example.com/cgi/urltest, path_info = /hello/world
wrong: http://example.com/cgi/urltest/hello+world gives
url = http://example.com/cgi/urltest/hello%20world , path_info =
/hello+world
CGI.pm v3.49
Perl: v5.8.8
O/S: CentOS 5.4
Apache, unknown version (whatever ships with CentOS 5.4)
Same results using IE8, Chromium 6.0.4, and Firefox 3.5.9
Script used to generate above results:
#!/usr/bin/perl
use strict;
use warnings;
use CGI qw(:standard);
print "Content-type: text/plain\n\n";
print "URL: [" . url() . "]\n";
print "PATH_INFO: [" . path_info() . "]\n";
--
Dave Weaver
Weather Services International