You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Stathy G. Touloumis" <st...@edventions.com> on 2002/03/14 00:53:08 UTC
Mapping files
Hi,
I am trying to map a uri to a file based on certain factors. I would like
to have this done after the 'Trans' phase when certain information is
available. I noticed when the original file mapping does not exist (what
apache maps in it's 'Trans' phase) the 'content_type' method does not return
a value. Also, even after remapping the file and changing the status a
'file not found' error is printed in the error logs. Any pointers as to
what I might be doing wrong?
Thanks,
RE: Mapping files
Posted by "Stathy G. Touloumis" <st...@edventions.com>.
Ok, I found an interim solution for my file mapping issue the problem I am
running into now is that get/post data associated with the request is lost .
. .
Is this covered in the mod_perl cookbook?
> > I am trying to map a uri to a file based on certain factors. I
> would like
> > to have this done after the 'Trans' phase when certain information is
> > available. I noticed when the original file mapping does not
> exist (what
> > apache maps in it's 'Trans' phase) the 'content_type' method
> does not return
> > a value.
>
>
> it shouldn't. mod_mime needs the filename the URI maps to in
> order to determine
> the MIME type.
>
>
> I actually found an initial answer after digging through the docs. After
> mapping the file I can create a new sub-request via lookup_file($filename)
> and take appropriate action. So far so good . . .
RE: Mapping files
Posted by "Stathy G. Touloumis" <st...@edventions.com>.
Well, I was able to do it nicely with a sub-request after calling
'lookup_filename'. I will still be picking up a copy of the cookbook though
: )
> > I am trying to map a uri to a file based on certain factors. I
> would like
> > to have this done after the 'Trans' phase when certain information is
> > available. I noticed when the original file mapping does not
> exist (what
> > apache maps in it's 'Trans' phase) the 'content_type' method
> does not return
> > a value.
>
>
> it shouldn't. mod_mime needs the filename the URI maps to in
> order to determine
> the MIME type.
Re: Mapping files
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Stathy G. Touloumis wrote:
> Hi,
>
> I am trying to map a uri to a file based on certain factors. I would like
> to have this done after the 'Trans' phase when certain information is
> available. I noticed when the original file mapping does not exist (what
> apache maps in it's 'Trans' phase) the 'content_type' method does not return
> a value.
it shouldn't. mod_mime needs the filename the URI maps to in order to determine
the MIME type.
HTH
--Geoff