Skip Menu |

This queue is for tickets about the SVN-Web CPAN distribution.

Report information
The Basics
Id: 21194
Status: resolved
Priority: 0/
Queue: SVN-Web

People
Owner: Nobody in particular
Requestors: simonerota [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.49
Fixed in: (no value)



Subject: mod_perl2 redirect
Log and Browse issue a cgi redirect when adding a trailing slash to the path, ignoring the fact we're using mod_perl2 (or mod_perl, I suppose). I attach a quick hack patch of no value for upstream sources, with the only purpose of clarifying what I'm talking about.
Subject: svnweb-mod_perl.patch
--- tmp/SVN-Web-0.49/lib/SVN/Web/Log.pm 2006-08-23 22:44:39.000000000 +0200 +++ /usr/lib/perl5/site_perl/5.8.8/SVN/Web/Log.pm 2006-08-26 20:04:05.715676250 +0200 @@ -226,8 +226,8 @@ my $kind = $root->check_path($path); if($kind == $SVN::Node::dir) { if($path !~ m|/$|) { - print $self->{cgi} - ->redirect(-uri => $self->{cgi}->self_url() . '/'); + $self->{cgi}->headers_out->set(Location => $self->{cgi}->unparsed_uri.'/'); + $self->{cgi}->status(302); } } --- tmp/SVN-Web-0.49/lib/SVN/Web/Browse.pm 2006-08-23 22:44:39.000000000 +0200 +++ /usr/lib/perl5/site_perl/5.8.8/SVN/Web/Browse.pm 2006-08-26 20:02:16.232834000 +0200 @@ -144,8 +144,9 @@ my $kind = $root->check_path($path); if($path !~ m|/$|) { - print $self->{cgi}->redirect(-uri => $self->{cgi}->self_url() . '/'); - return; + $self->{cgi}->headers_out->set(Location => $self->{cgi}->unparsed_uri.'/'); + $self->{cgi}->status(302); + return 302; } $path =~ s|/$|| unless $path eq '/';
Thanks for the bug report. SVN::Web 0.50, to be released very shortly, will not have this problem.