summaryrefslogtreecommitdiff
path: root/rt/html/NoAuth/images/autohandler
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html/NoAuth/images/autohandler')
-rw-r--r--rt/html/NoAuth/images/autohandler24
1 files changed, 0 insertions, 24 deletions
diff --git a/rt/html/NoAuth/images/autohandler b/rt/html/NoAuth/images/autohandler
deleted file mode 100644
index 2e428c1..0000000
--- a/rt/html/NoAuth/images/autohandler
+++ /dev/null
@@ -1,24 +0,0 @@
-<%init>
-
-# 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 unless (-f $file && -r $file);
-$r->content_type($type);
-open (FILE, "<$file") || die;
-{
- local $/ = \16384;
- $m->out($_) while (<FILE>);
- close(FILE);
-}
-$m->abort;
-</%init>