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: 18692
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: LDS [...] cpan.org
Requestors: jvdias [...] redhat.com
Cc:
AdminCc:

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

Attachments


Subject: url(-relative=>1) must use $uri, not $script_name, if $rewrite_in_use
Download (untitled) / with headers
text/plain 359b
This is Red Hat Bugzilla 188411: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441 If the URL has been rewritten (script_name != request_uri), the code correctly uses $request_uri, unless $rewrite==0 . But if $relative>0, then $script_name is still used. Is this not a bug ? I propose the attached patch (generated against 3.15 code).
Subject: perl-5.8.8-bz188441.patch
--- perl-5.8.8/lib/CGI.pm~ 2006-01-08 11:40:30.000000000 -0500 +++ perl-5.8.8/lib/CGI.pm 2006-04-12 18:49:26.000000000 -0400 @@ -2650,7 +2650,7 @@ return $url if $base; $url .= $uri; } elsif ($relative) { - ($url) = $script_name =~ m!([^/]+)$!; + ($url) = $uri =~ m!([^/]+)$!; } elsif ($absolute) { $url = $uri; }
Download (untitled) / with headers
text/plain 533b
Fixed in version 3.19, which will be released when other bugs are dealt with. On Wed Apr 12 19:09:50 2006, guest wrote: Show quoted text
> This is Red Hat Bugzilla 188411: > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441 > > If the URL has been rewritten (script_name != request_uri), the code > correctly uses $request_uri, unless $rewrite==0 . > > But if $relative>0, then $script_name is still used. > > Is this not a bug ? > > I propose the attached patch (generated against 3.15 code). > > > >


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.