From: Fredrik Tolf Date: Fri, 24 Jun 2011 14:08:13 +0000 (+0200) Subject: doc: Clarified dirplex' mapping a bit. X-Git-Tag: 0.9~6^2 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=5ba4cb3a4ee0220e7bd1f2480c2b2f831004266d doc: Clarified dirplex' mapping a bit. --- diff --git a/doc/dirplex.doc b/doc/dirplex.doc index 362a5d7..e4c3b3e 100644 --- a/doc/dirplex.doc +++ b/doc/dirplex.doc @@ -49,16 +49,20 @@ Mapping URLs into physical files is an iterative procedure, each step looking in one single physical directory, starting with 'DIR'. For each step, a path element is stripped off the beginning of the rest string and examined, the path element being either the leading part of -the rest string up until the first slash, or the entire rest string if -it contains no slashes. If the rest string is empty, the directory -being examined is considered the result of the mapping. Otherwise, any -escape sequences in the path element under consideration are unescaped -before examining it. +the rest string up until (but not including) the first slash, or the +entire rest string if it contains no slashes. If the rest string is +empty, the directory being examined is considered the result of the +mapping. Otherwise, any escape sequences in the path element under +consideration are unescaped before examining it. If the path element names a directory in the current directory, the -procedure continues in that directory. If it names a file, that file -is considered the result of the mapping (even if the rest string has -not been exhausted yet). +procedure continues in that directory, unless there is nothing left of +the rest string, in which case *dirplex* responds with a HTTP 301 +redirect to the same URL, but ending with a slash. Otherwise, the +remaining rest string begins with a slash, which is stripped off +before continuing. If the path element names a file, that file is +considered the result of the mapping (even if the rest string has not +been exhausted yet). If the path element does not name anything in the directory under consideration, but contains no dots, then the directory is searched