1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/www/p5-Apache-MP3/files/mod_perl2.patch
Christian Weisgerber 641d5ad108 Make Apache::MP3 work under apache2 and mod_perl2.
PR:		54635
Submitted by:	Dominic Mitchell <dom@happygiraffe.net>
2003-07-23 23:57:52 +00:00

53 lines
1.4 KiB
Diff

--- MP3.pm.orig Sat Feb 15 00:47:48 2003
+++ MP3.pm Sat Jul 19 13:21:56 2003
@@ -9,7 +9,7 @@
}
use Apache;
-use Apache::Constants qw(:common REDIRECT HTTP_NO_CONTENT DIR_MAGIC_TYPE HTTP_NOT_MODIFIED);
+use Apache::Constants qw(:common REDIRECT HTTP_NO_CONTENT HTTP_NOT_MODIFIED);
use Apache::MP3::L10N;
use IO::File;
use Socket 'sockaddr_in';
@@ -25,6 +25,8 @@
use constant DEBUG => 0;
+use constant DIR_MAGIC_TYPE => 'httpd/unix-directory';
+
# defaults:
use constant BASE_DIR => '/apache_mp3';
use constant STYLESHEET => 'apache_mp3.css';
@@ -75,7 +77,7 @@
}
END
-sub handler ($$) {
+sub handler : method {
my $class = shift;
my $obj = $class->new(@_) or die "Can't create object: $!";
return $obj->run();
@@ -395,14 +397,14 @@
my $self = shift;
my $dir = shift;
- unless ($self->r->path_info){
- #Issue an external redirect if the dir isn't tailed with a '/'
- my $uri = $self->r->uri;
- my $query = $self->r->args;
- $query = "?" . $query if defined $query;
- $self->r->header_out(Location => "$uri/$query");
- return REDIRECT;
- }
+# unless ($self->r->path_info){
+# #Issue an external redirect if the dir isn't tailed with a '/'
+# my $uri = $self->r->uri;
+# my $query = $self->r->args;
+# $query = "?" . $query if defined $query;
+# $self->r->header_out(Location => "$uri/$query");
+# return REDIRECT;
+# }
return $self->list_directory($dir);
}