Viljo Marrandi <[EMAIL PROTECTED]> said something to this effect on 07/03/2001:
> > If sounds like you want to use r->path_info in your application,
> > so you *can't* create these directories, or they will become part
> > of r->filename, not r->path_info.
> 
> 
> Actually i thought about r->uri. It returns everything after
> servername and if i split it using '/' as separator i think i'm
> almost there ;o).  Or are there any reasons i shouldn't use
> r->uri?

It depends on what you are trying to accomplish, of course, but
for most purposes, yeah, splitting r->uri on '/' will give a
useful list of directories. If you are using these as actual
filenames, and ignoring r->filaname, however, beware of requests
like:

  http://foo.bar.baz/my_hander/../../../../../../../etc/passwd

which might be trying to get you to send your /etc/passwd. If you
are using the URI to dispatch the request to a particular Perl
module, take a look at Apache::Dispatch.

(darren)

-- 
The more we disagree, the better the chance that one of us is right.

Reply via email to