Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
Summary: url(-relative=>1) is broken in CGI.pm Product: Fedora Core Version: fc5 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: normal Component: perl AssignedTo: jvdias@redhat.com ReportedBy: bruno@wolff.to QAContact: dkl@redhat.com CC: fedora-perl-devel-list@redhat.com
Description of problem: url(-relative) no longer returns the original relative path before rewrites. This used to work in FC4.
Version-Release number of selected component (if applicable): perl-5.8.8-4
How reproducible: 100%
Steps to Reproduce: 1. Set up a redirect in your .htaccess file such as: RewriteEngine On RewriteBase / RewriteRule ^testabc.cgi$ test.cgi 2. Create a test perl script, test.cgi such as: #!/usr/bin/perl
use CGI qw/:standard -no_xhtml/;
print "Content-type: text/plain\n\n"; print url(-relative=>1), "\n"; print url(-absolute=>1), "\n";
3. Look at the web page /testabc.cgi
Actual results: test.cgi /testabc.cgi
Expected results: testabc.cgi /testabc.cgi
Additional info:
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
jvdias@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jorton@redhat.com
------- Additional Comments From jvdias@redhat.com 2006-04-12 17:16 EST ------- Hmmm, this does not seem to be a problem with perl's CGI:: module -
I put your rewrite rule in /etc/httpd/conf/httpd.conf's /var/www/cgi-bin/ 'Directory' entry, from the standard config from a clean install of httpd-2.2.0-6 , so it now reads: --- <Directory "/var/www/cgi-bin"> AllowOverride None Options FollowSymLinks Order allow,deny Allow from all RewriteEngine On RewriteBase /cgi-bin RewriteRule ^testabc.cgi$ test.cgi </Directory> ---
NOTE: before the server would process the rewrite rule, it insisted that the FollowSymLinks or FollowSymLinks owner option be specified - without one of these options enabled, rewrite rules will be ignored.
Then your example test.cgi script works as expected, producing the output: testabc.cgi /testabc.cgi
Perhaps your http server is not loading your .htaccess file correctly / doesn't allow the FollowSymLinks or RewriteRule options ?
I'm CC-ing the httpd maintainer on this - perhaps he could shed some light on why the rewrite rule might not be taking effect.
If the rewrite rule is correctly applied, the perl CGI module seems to have no problem with url(-relative=>1) / url(-absolute=>1) .
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From jvdias@redhat.com 2006-04-12 17:49 EST ------- Sorry - my mistake - I was looking at the wrong output - it does produce : test.cgi /testabc.cgi.
This is a CPAN CGI module bug: http://rt.cpan.org/Public/Bug/Display.html?id=18500
I'll try out the patch from the above bug (now in CGI 3.17) and see if it fixes the problem - if so, it can go into the next perl-5.8.8-6+ release.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From jvdias@redhat.com 2006-04-12 18:53 EST ------- OK, I now see the problem - CGI.pm-3.15 has a new "-rewrite" sub url() parameter, which, if 0, is meant to make url() return the "$SCRIPT_NAME", not the "$REQUEST_URI". It seems the programmer applies this logic only in the case of '-absolute=>1', NOT '-relative=>1'. Yes, this seems like a bug to me - and is still in the latest 3.17 version. Please try out the attached CGI.pm which fixes the problem - if it works OK, I'll submit it with the next perl-5.8.8-6 version.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From jvdias@redhat.com 2006-04-12 18:54 EST ------- Created an attachment (id=127678) --> (https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=127678&action=vie...) CGI.pm (3.15) fixed to use rewritten REQUEST_URI in url() if rewrite!=0
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From jvdias@redhat.com 2006-04-12 18:55 EST ------- Sorry, should have mentioned: copy the above CGI.pm attachment to /usr/lib/perl5/5.8.8/CGI.pm to test.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From bruno@wolff.to 2006-04-12 22:26 EST ------- I tried this out and it looks like it is working. Thanks.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
jvdias@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
------- Additional Comments From jvdias@redhat.com 2006-04-13 16:30 EST ------- Thanks for the testing. The fix is now checked into CVS and will go into the next perl-5.8.8-6 release. Upstream CPAN CGI.pm bug raised: [rt.cpan.org #18692] http://rt.cpan.org/Ticket/Display.html?id=18692
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From updates@fedora.redhat.com 2006-06-05 17:00 EST ------- perl-5.8.8-5 has been pushed for fc5, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From redhat@spiritvideo.com 2006-06-12 01:49 EST ------- I encountered this bug today (or perhaps it's just a very similar one -- mine is described in http://rt.cpan.org/Public/Bug/Display.html?id=4709, but it has apparently been fixed since Dec '05) -- I installed FC5 yesterday, and did a yum update last night to update all installed packages. I still have perl-5.8.8-4, which contains CGI.pm 3.15, which has the bug. Tonight I did a 'yum update perl' but it returned 'Could not find update match for perl'.
I was able to work around it by updating the package directly from CPAN, but now it is outside of RPM/yum control. I got CGI.pm 3.20 from CPAN, which does not have the bug.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From updates@fedora.redhat.com 2006-06-12 11:46 EST ------- perl-5.8.8-5 has been pushed for fc5, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
------- Additional Comments From bruno@wolff.to 2006-06-12 16:39 EST ------- I just upgraded and this seems to have fixed the problem. (Previously I had replaced CGI.pm, but I double checked to make sure that file had been replaced by the update.) Unless there are other versions of FC that still need this fix, I think this bug can be closed.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
jvdias@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |199152 nThis| |
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: url(-relative=>1) is broken in CGI.pm
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188441
rnorwood@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jvdias@redhat.com |rnorwood@redhat.com
------- Additional Comments From rnorwood@redhat.com 2006-10-01 19:33 EST ------- assigning to rnorwood@redhat.com
perl-devel@lists.fedoraproject.org