<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- Apache/MP3.pm.7	2003-06-06 17:04:27.000000000 +1000
+++ Apache/MP3.pm	2003-06-06 17:13:26.000000000 +1000
@@ -129,7 +129,7 @@
   my $self = shift;
 
   $self-&gt;r-&gt;send_http_header( $self-&gt;html_content_type );
-  return OK if $self-&gt;r-&gt;header_only;
+  return Apache::OK if $self-&gt;r-&gt;header_only;
 
   print start_html(
 		   -lang =&gt; $self-&gt;lh-&gt;language_tag,
@@ -246,20 +246,20 @@
       $self-&gt;send_playlist(\@matches);
     }
 
-    return OK;
+    return Apache::OK;
   }
 
   # this is called to generate a playlist for selected files
   if (param('Play Selected')) {
-    return HTTP_NO_CONTENT unless my @files = param('file');
+    return Apache::HTTP_NO_CONTENT unless my @files = param('file');
     my $uri = dirname($r-&gt;uri);
     $self-&gt;send_playlist([map { "$uri/$_" } @files]);
-    return OK;
+    return Apache::OK;
   }
 
   # otherwise don't know how to deal with this
   $self-&gt;r-&gt;log_reason('Invalid parameters -- possible attempt to circumvent checks.');
-  return FORBIDDEN;
+  return Apache::FORBIDDEN;
 }
 
 # this generates the top-level directory listing
@@ -273,7 +273,7 @@
     my $query = $self-&gt;r-&gt;args;
     $query = "?" . $query if defined $query;
     $self-&gt;r-&gt;header_out(Location =&gt; "$uri/$query");
-    return REDIRECT;
+    return Apache::REDIRECT;
   }
 
   return $self-&gt;list_directory($dir);
@@ -289,9 +289,9 @@
 
   if ($is_audio &amp;&amp; !$self-&gt;download_ok) {
     $self-&gt;r-&gt;log_reason('File downloading is forbidden');
-    return FORBIDDEN;
+    return Apache::FORBIDDEN;
   } else {
-    return DECLINED;  # allow Apache to do its standard thing
+    return Apache::DECLINED;  # allow Apache to do its standard thing
   }
 
 }
@@ -302,17 +302,17 @@
   my $self = shift;
   my $r = $self-&gt;r;
 
-  return DECLINED unless -e $r-&gt;filename;  # should be $r-&gt;finfo
+  return Apache::DECLINED unless -e $r-&gt;filename;  # should be $r-&gt;finfo
 
   unless ($self-&gt;stream_ok) {
     $r-&gt;log_reason('AllowStream forbidden');
-    return FORBIDDEN;
+    return Apache::FORBIDDEN;
   }
 
   if ($self-&gt;check_stream_client and !$self-&gt;is_stream_client) {
     my $useragent = $r-&gt;header_in('User-Agent');
     $r-&gt;log_reason("CheckStreamClient is true and $useragent is not a streaming client");
-    return FORBIDDEN;
+    return Apache::FORBIDDEN;
   }
 
   return $self-&gt;send_stream($r-&gt;filename,$r-&gt;uri);
@@ -322,12 +322,12 @@
 sub send_playlist {
   my $self = shift;
   my ($urls,$shuffle) = @_;
-  return HTTP_NO_CONTENT unless @$urls;
+  return Apache::HTTP_NO_CONTENT unless @$urls;
   my $r = $self-&gt;r;
   my $base = $self-&gt;stream_base;
 
   $r-&gt;send_http_header('audio/mpegurl');
-  return OK if $r-&gt;header_only;
+  return Apache::OK if $r-&gt;header_only;
 
   # local user
   my $local = $self-&gt;playlocal_ok &amp;&amp; $self-&gt;is_local;
@@ -377,7 +377,7 @@
       $r-&gt;print ("$base$_?$stream_parms$CRLF");
     }
   }
-  return OK;
+  return Apache::OK;
 }
 
 sub stream_parms {
@@ -468,7 +468,7 @@
   my $self = shift;
   my $dir  = shift;
 
-  return DECLINED unless -d $dir;
+  return Apache::DECLINED unless -d $dir;
 
   my $last_modified = (stat(_))[9];
 
@@ -478,15 +478,15 @@
     my ($time, $ver) = $check =~ /^([a-f0-9]+)-([0-9.]+)$/;
 
     if ($check eq '*' or (hex($time) == $last_modified and $ver == $VERSION)) {
-      return HTTP_NOT_MODIFIED;
+      return Apache::HTTP_NOT_MODIFIED;
     }
   }
 
-  return DECLINED unless my ($directories,$mp3s,$playlists,$txtfiles)
+  return Apache::DECLINED unless my ($directories,$mp3s,$playlists,$txtfiles)
     = $self-&gt;read_directory($dir);
 
   $self-&gt;r-&gt;send_http_header( $self-&gt;html_content_type );
-  return OK if $self-&gt;r-&gt;header_only;
+  return Apache::OK if $self-&gt;r-&gt;header_only;
 
   $self-&gt;page_top($dir);
   $self-&gt;directory_top($dir);
@@ -514,7 +514,7 @@
   print hr                         unless %$mp3s;
   print "\n&lt;!-- end main --&gt;\n";
   $self-&gt;directory_bottom($dir);
-  return OK;
+  return Apache::OK;
 }
 
 # print the HTML at the top of the page
@@ -1268,8 +1268,8 @@
 
   my $mime = $r-&gt;content_type;
   my $info = $self-&gt;fetch_info($file,$mime);
-  return DECLINED unless $info;  # not a legit mp3 file?
-  my $fh = $self-&gt;open_file($file) || return DECLINED;
+  return Apache::DECLINED unless $info;  # not a legit mp3 file?
+  my $fh = $self-&gt;open_file($file) || return Apache::DECLINED;
   binmode($fh);  # to prevent DOS text-mode foolishness
 
   my $size = -s $file;
@@ -1317,7 +1317,7 @@
   $r-&gt;print("Content-Length: $size$CRLF");
   $r-&gt;print("Content-Type: $mime$CRLF");
   $r-&gt;print("$CRLF");
-  return OK if $r-&gt;header_only;
+  return Apache::OK if $r-&gt;header_only;
 
   if (my $timeout = $self-&gt;stream_timeout) {
     my $seconds  = $info-&gt;{seconds};
@@ -1330,12 +1330,12 @@
       $bytes -= $b;
       $r-&gt;print($data);
     }
-    return OK;
+    return Apache::OK;
   }
 
   # we get here for untimed transmits
   $r-&gt;send_fd($fh);
-  return OK;
+  return Apache::OK;
 }
 
 # called to open the MP3 file
</pre></body></html>