Tim Noll wrote: > > As an alternative, I have used a PerlFixupHandler that detects a MIME > > type of text/html and for only those enables Mason leaving the rest > > alone. This lets autoindexing still work properly, as well as images > > and other content in the same directory. The same trick can work with > > Template. The code looks like this: > > I actually tried something like this after seeing it in one of your Web > Techniques columns. Unfortunately, the content_type for anything in this > Location is returning empty. As far as I can tell, because I'm using a > Location directive but no Alias, Apache splits the URI between the > directory and the file name, and thus looks at the directory when it > tries to determine the filename and content_type, but puts the actual > file name into path_info. That means that not only is there no > corresponding file, but there's no extension on what Apache thinks is > the file name, so it can't determine the content type. > > On the other hand, if I use an Alias directive and map that URI to the > actual location of the template files, then Apache *can* determine the > content_type. However, that eliminates the path_info that I was using as > the file name in Template->process. Of course, I could always use > filename instead of path_info, but that goes against Template's default > rejection of absolute paths, which I assume is there for security > reasons. > > Have I configured something wrong? Is this an issue only on Windows?
I can now report that, having finally moved this project from Win2K to Debian, this problem has gone away. I haven't tested it rigorously enough to know whether it's really a Windows-only issue, but it's certainly gone now. Sorry to have bothered the Template list with this issue -- it's definitely a mod_perl thing. -Tim P.S. Hmmm ... this is my second reply to one of my own posts today ... maybe it's time for some sleep ...