Subject: | patch to make Apache::MP3 4.00 work under mod_perl 2 |
To make the module (version 4.00) run under Apache 2.0.55 and mod_perl
2.0.1 I had to apply the attached patch.
Hope this helps.
Subject: | apache-mp3.patch |
diff -ru Apache-MP3-4.00/MP3/Resample.pm Apache-MP3-4.00-patched/MP3/Resample.pm
--- Apache-MP3-4.00/MP3/Resample.pm 2006-04-15 03:14:02.000000000 +0200
+++ Apache-MP3-4.00-patched/MP3/Resample.pm 2006-04-21 17:12:45.000000000 +0200
@@ -60,7 +60,7 @@
# don't set cookies for ordinary MP3 file downloads.
return if !param() && !-d $r->filename;
- if (my $cookies = CGI::Cookie->parse($r->headers_in('Cookie'))) {
+ if (my $cookies = CGI::Cookie->parse($r->headers_in->{Cookie})) {
$self->bitrate($cookies->{bitrate}->value)
if $cookies->{bitrate};
}
diff -ru Apache-MP3-4.00/MP3.pm Apache-MP3-4.00-patched/MP3.pm
--- Apache-MP3-4.00/MP3.pm 2006-01-03 20:37:52.000000000 +0100
+++ Apache-MP3-4.00-patched/MP3.pm 2006-04-21 17:13:52.000000000 +0200
@@ -16,7 +16,6 @@
use Apache::MP3::L10N;
use APR::Table;
use IO::File;
-use Socket 'sockaddr_in';
use CGI qw(:standard *table *td *TR *blockquote *center center *h1);
use CGI::Carp 'fatalsToBrowser';
@@ -1864,9 +1863,7 @@
sub is_local {
my $self = shift;
my $r = $self->r;
- my ($serverport,$serveraddr) = sockaddr_in($r->connection->local_addr);
- my ($remoteport,$remoteaddr) = sockaddr_in($r->connection->remote_addr);
- return $serveraddr eq $remoteaddr;
+ return $r->connection->local_ip() eq $r->connection->remote_ip();
}
# Check if the requesting client is on the local network, as defined by