[rt-users] Can't get images to load

Paul Tomblin ptomblin at xcski.com
Mon Jun 4 21:30:01 EDT 2012


The mystery deepens.  I put some debugging into the autohandler in
/opt/rt4/share/html/NoAuth/images/autohandler:

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

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 =
/NoAuth/images/favicon.png
(/opt/rt4/share/html/NoAuth/images/autohandler:7)
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
http://localhost:8080/NoAuth/images/foo.gif
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.

Stack:
[/opt/rt4/share/html/NoAuth/images/foo.gif:18]
[/usr/share/perl5/HTML/Mason/Interp.pm:817]
[/usr/share/perl5/HTML/Mason/Interp.pm:458]
[/usr/share/perl5/HTML/Mason/Request.pm:249]
[/usr/share/perl5/HTML/Mason/Request.pm:212]
[/opt/rt4/sbin/../lib/RT/Interface/Web/Request.pm:62]
[/usr/share/perl5/Class/Container.pm:275]
[/usr/share/perl5/Class/Container.pm:353]
[/usr/share/perl5/HTML/Mason/Interp.pm:348]
[/usr/share/perl5/HTML/Mason/Interp.pm:342]
[/usr/share/perl5/HTML/Mason/PSGIHandler.pm:48]
[/usr/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm:52]
[/opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm:263]
[/usr/share/perl5/Plack/Util.pm:315]
[/usr/share/perl5/Plack/Util.pm:315]
[/usr/share/perl5/HTTP/Server/PSGI.pm:185]
[/usr/share/perl5/HTTP/Server/PSGI.pm:134]
[/usr/share/perl5/HTTP/Server/PSGI.pm:62]
[/usr/share/perl5/Plack/Handler/HTTP/Server/PSGI.pm:14]
[/usr/share/perl5/Plack/Loader.pm:87]
[/usr/share/perl5/Plack/Runner.pm:263]
[/opt/rt4/sbin/rt-server:232]

It's a very great mystery to me.


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin



More information about the rt-users mailing list