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

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


Author: sunnavy
Date: Thu Jan 29 03:20:02 2009
New Revision: 17993

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

Log:
 r19178 at sunnavys-mb:  sunnavy | 2009-01-29 15:04:36 +0800
 merged share/html/NoAuth/css/web2/images/dhandler


Modified: rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/web2/images/dhandler
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/web2/images/dhandler	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/web2/images/dhandler	Thu Jan 29 03:20:02 2009
@@ -1,25 +1,8 @@
 <%INIT>
-&RT::Interface::Web::static_file_headers();
 use File::Basename;
 my $arg = $m->dhandler_arg;
 my $file = dirname($m->current_comp->source_file) . '/source/'. $arg;
+RT::Interface::Web->send_static_file( file => $file );
 
-my $type = "application/octet-stream";
-if ($file =~ /\.(gif|png|jpe?g)$/i) {
-    $type = "image/$1";
-    $type =~ s/jpg/jpeg/gi;
-}
-
-die "File $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;
 </%INIT>


More information about the Rt-commit mailing list