[Rt-commit] r17994 - in rt/3.999/branches/merge_to_3.8.2: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 03:20:15 EST 2009


Author: sunnavy
Date: Thu Jan 29 03:20:15 2009
New Revision: 17994

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/images/autohandler

Log:
 r19179 at sunnavys-mb:  sunnavy | 2009-01-29 15:07:28 +0800
 merged share/html/NoAuth/images/autohandler


Modified: rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/images/autohandler
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/images/autohandler	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/images/autohandler	Thu Jan 29 03:20:15 2009
@@ -1,28 +1,8 @@
 <%INIT>
-&RT::Interface::Web::static_file_headers();
 
 # This autohandler will spit out RT's images if the user hasn't 
 # properly configured their webserver to stop RT from passing 
 # images through the mason handler.
 my $file = $m->base_comp->source_file;
-
-
-my $type = "application/octet-stream";
-if ($file =~ /\.(gif|png|jpe?g)$/i) {
-    $type = "image/$1";
-    $type =~ s/jpg/jpeg/gi;
-}
-
-die "file not found" unless -f $file && -r _;
-
-$r->content_type($type);
-open my $fh, "<$file" or die "couldn't open file: $!";
-binmode($fh);
-{
-    local $/ = \16384;
-    $m->out($_) while (<$fh>);
-    $m->flush_buffer;
-}
-close $fh;
-$m->abort;
+RT::Interface::Web->send_static_file( file => $file );
 </%INIT>


More information about the Rt-commit mailing list