Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 58377
Status: resolved
Priority: 0/
Queue: CGI

Owner: MARKSTOS [...]
Requestors: davew [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Download (untitled) / with headers
text/plain 902b
Weaver, Dave <> Hello, I found what appears to be a bug in url() returns an incorrect url if there is a “+” in PATH_INFO e.g: correct: gives url =, path_info = /hello/world wrong: gives url = , path_info = /hello+world 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
Download (untitled) / with headers
text/plain 902b
Today I added some test coverage for this to t/url.t. The tests passed against 3.63, so it appears that if there was actually an issue here, it has been resolved. If you are still experiencing an issue with the latest release, please submit further failing tests for t/url.t which illustrate it. subtest 'RT#58377: + in PATH_INFO' => sub { local $ENV{PATH_INFO} = '/hello+world'; local $ENV{HTTP_X_FORWARDED_HOST} = undef; local $ENV{'HTTP_HOST'} = ''; local $ENV{'SCRIPT_NAME'} = '/script/plus+name.cgi'; local $ENV{'SCRIPT_FILENAME'} = '/script/plus+filename.cgi'; my $q = CGI->new; is($q->url(), '', 'a plus sign in a script name is preserved when calling url()'); is($q->path_info(), '/hello+world', 'a plus sign in a script name is preserved when calling path_info()'); };

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to