Can't get images to load

I’m writing my code as an extension to make it easier to load on my
customer’s development, test and production servers. I’m trying to
add an ajax spinner, so I added it in my source directory
html/NoAuth/images/foo/ajax-spinner.gif, and it gets installed in
however when I try to load that file, I get the problem where Mason is
trying to interpret the file as source. Now I just read something
about that yesterday or today, either here on the list or on IRC, but
I can’t find the actual message. But based on what I remembered, I
copied the autohandler from /opt/rt4/share/html/NoAuth/images/ into my
image directory, hoping that would make the gif load as a gif instead
of as a Mason file. But it doesn’t seem to be happening. I even put
a $RT::Logger->debug line in the autohandler and it doesn’t seem to be

I’m running the server in stand-alone mode, built using
./configure --enable-devel-mode --with-my-user-group --with-db-type=Pg
and started up with
/opt/rt4/sbin/rt-server --server Standalone --port 8080

The mystery deepens. I put some debugging into the autohandler in


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 $relfile = $m->base_comp->path;
$RT::Logger->debug(“autohandler file = $file, relfile = $relfile”);
RT::Interface::Web->SendStaticFile( File => $file, RelativeFile => $relfile );

And when I try to load
http://localhost:8080/NoAuth/images/favicon.png, I see the following
come out in my log:
[Tue Jun 5 01:24:59 2012] [debug]: autohandler file =
/opt/rt4/share/html/NoAuth/images/favicon.png, relfile =
and the image shows up correctly. But if I put my own image into that
directory and try to access it using the similar url
I don’t get any debug to indicate that the autohandler has been
called, and I get the following error

error: Error during compilation of /opt/rt4/share/html/NoAuth/images/foo.gif:
Unrecognized character \x80; marked by ← HERE after foo.gif"
6<-- HERE near column 1425 at /opt/rt4/share/html/NoAuth/images/foo.gif line 18.


It’s a very great mystery to me.