rp_abstract_url_server

EveAndersson.com : API Browser : rp_abstract_url_server

rp_abstract_url_server

rp_abstract_url_server
Defined in packages/acs-core/abstract-url-procs.tcl

Searches through the file system for an appropriate file to serve, based on $ad_conn(urlv). The algorithm is as follows:

  1. If the URL specifies a directory but doesn't have a trailing slash, append a slash to the URL and redirect (just like AOLserver would).
  2. If the URL specifies a directory and does have a trailing slash, append "index" to the URL (so we'll search for an index.* file in the filesystem).
  3. If the file corresponding to the requested URL exists (probably because the user provided the extension), just deliver the file.
  4. Find a file in the file system with the provided URL as the root (i.e., some file exists which is the URL plus some extension). Give precedence to extensions specified in the ExtensionPrecedence parameter in the abstract-url configuration section (in the order provided). If such a file exists, deliver it.
  5. The requested resource doesn't exist - return a 404 Not Found.
This routine should really be part of the request processor.

[ show source ]

Show another procedure:

eve@eveandersson.com