share/html/NoAuth/images/autohandler purports to serve images directly, before
Mason gets a chance to. However, Mason loads (that is, compiles)
$m->request_comp as soon as the request object is created, so the autohandler
doesn’t actually get a chance to intervene in the case where the image file
being requested has a Mason syntax error.
The attached patch includes a test and a fix for the standalone server.
Similar solutions are probably needed for running under mod_perl or fastcgi.
standalone-image.patch (2.48 KB)