1. When HTTP request arrives, it is received and parsed in the main process. First line of request is parsed, "query" part separated from the path, and URL-encoding is applied to the path.
2. If the last character is a slash, flag "trailing slash" is set for request.
3. If anonymous user is not defined, 403 Forbidden
is returned, and request processing is finished
4. Parameters for URL to filename translation are
initialized, "/" is mapped according to
AddressRoot configuration line that corresponds
to the local IP address, or, if there is no such line, the
home directory of the anonymous user. Pathname from URL is
translated first time to the absolute pathname by
prepending that directory and slash. This translation can be
overridden later.
| HTTP 1.x | HTTP 0.9 |
|---|---|
|
5a. If HTTP 1.x is used by the client, request header lines are received. Every line of request header is passed through the following process:
Header lines are matched with |
5b. If HTTP 0.9 is used by
the client, processing of rules is performed with no
header lines because HTTP 0.9 has no header. Rules may
redirect names and mappings, and further processing will be
done with the result of this processing. rules are applied
like in the case of HTTP 1.x request, however there are no
header lines, so only |
|
6a. If HTTP 1.x is used by the client, access
rights are checked. Only
"restrict" line is
required to define all sets of URLs that have any
restrictions, and if the same username with different
passwords will appear in different realms, URLs that have
AccessRights for multiple realms with the
same username will be accessible only
to the user in the realm, mentioned last in the
configuration.
|
6b. If HTTP 0.9 is used by
the client, access rights are checked because HTTP 0.9
doesn't support authentication. If ANY restriction
exists (anything but |
7. Absolute pathname is checked against the list of
preloaded files. If absolute pathname matches and either
trailing slash matches with trailing slash flag, set for
preloaded file, or check for trailing slash is disabled by
"-" in the
configuration line as a filename, preloaded file is used. If
absolute pathname matches, trailing slash is present in the
request but trailing slash flag is not set for the preloaded
file, 404
Not Found is returned (in normal HTTP 1.0 response for
HTTP 1.x request, or in the text of response for HTTP 0.9 because
HTTP 0.9 responses don't have a header). If absolute pathname
matches and trailing slash is not present in the request, but
trailing slash flag is set for the preloaded file, the response is
302 Moved Temporarily with redirection to the same
URL with trailing slash. It's normal HTTP 1.0 response for
HTTP 1.x request or text
Directory
This directory is located here
with a link to the same file with
trailing slash for HTTP 0.9 request because HTTP 0.9
does not support redirects.
8. If no other response is produced,
[Auth]Application mapping is used at this point. If absolute
pathname matches and either trailing slash matches with trailing
slash flag, set for application, or check for trailing slash is
disabled by "-" in the configuration line as a
filename, application is used. If absolute pathname matches, trailing
slash is present in the request but trailing slash flag is not
set for the application, 404 Not Found is returned
(in normal HTTP 1.0 response for
HTTP 1.x request, or in the text of response for HTTP 0.9 because
HTTP 0.9 responses don't have a header). If absolute pathname matches
and trailing slash is not present in the request, but trailing slash
flag is set for the preloaded file, the response is
302 Moved Temporarily with redirection to the same
URL with trailing slash. It's normal HTTP 1.0 response for
HTTP 1.x request or text
Directory
This directory is located here
with a link to the same file with
trailing slash for HTTP 0.9 request because HTTP 0.9
does not support redirects.
If there is no matching application,
404 Not Found is returned, and processing is
finished.
9. If application is chosen, request is passed to module process that implements this application.