1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-07-12 06:49:18 -04:00
ports/www/p5-Apache-MP3/files/mod_perl2.patch
Philip Paeps d7570f7531 Unbreak after the mod_perl2 API dance.
Approved by:	krion (mentor), dom@happygiraffe.net (maintainer)
2005-06-10 10:42:18 +00:00

57 lines
1.5 KiB
Diff

--- MP3.pm.orig Mon Oct 6 16:06:10 2003
+++ MP3.pm Thu Jun 9 15:37:04 2005
@@ -5,11 +5,11 @@
BEGIN {
require mod_perl;
- require Apache::compat if $mod_perl::VERSION >= 1.99;
+ require Apache2::compat if $mod_perl::VERSION >= 1.99;
}
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();
@@ -415,14 +417,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);
}