Index: openacs-4/packages/acs-core-docs/www/rp-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-design.html,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-core-docs/www/rp-design.html 27 Oct 2014 16:39:25 -0000 1.37 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 7 Aug 2017 23:47:52 -0000 1.38 @@ -1,8 +1,8 @@ -Request Processor Design

Request Processor Design

By Rafael H. Schloming

+Request Processor Design

Request Processor Design

By Rafael H. Schloming

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Essentials

Essentials

  • OpenACS 4 Request Processor Requirements

  • Request Processor Stages and API

  • /packages/acs-tcl/tcl/request-processor-procs.tcl

  • /packages/acs-tcl/tcl/request-processor-init.tcl

  • /packages/acs-tcl/tcl/site-nodes-procs.tcl

  • @@ -44,7 +44,7 @@ given package_url, and package mountings must be persistent across server restarts and users must be able to manipulate the mountings on a live site, therefore this mapping is stored in the database.

    Authentication and Authorization

    Once the request processor has located both the package_id and concrete -file associated with the request, authentication is performed by the session security system. After authentication has +file associated with the request, authentication is performed by the session security system. After authentication has been performed the user is authorized to have read access for the given package by the OpenACS 4 Permissions Design. If authorization succeeds then the request is served, otherwise it is @@ -61,7 +61,7 @@ package pageroot, even though the global pageroot is searched later. If a file is found at any of the searched locations then it is served.

    Virtual URL Handlers

    If no file is found during the concrete file search, then the request processor searches the filesystem for a virtual url handler -(.vuh) file. This file contains normal tcl code, and is in +(.vuh) file. This file contains normal Tcl code, and is in fact handled by the same extension handling procedure that handles .tcl files. The only way this file is treated differently is in how the request processor searches for it. When a lookup fails, the request processor @@ -92,11 +92,11 @@ the ad_conn procedure. The following variables are available for public use. If the ad_conn procedure doesn't recognize a variable being passed to it for a lookup, it tries to get a value using ns_conn. This guarantees that -ad_conn subsumes the functionality of ns_conn.

    Request processor
    [ad_conn urlv] A list containing each element of the URL
    [ad_conn url] The URL associated with the request.
    [ad_conn query] The portion of the URL from the ? on (i.e. GET +ad_conn subsumes the functionality of ns_conn.

    Request processor
    [ad_conn urlv] A list containing each element of the URL
    [ad_conn url] The URL associated with the request.
    [ad_conn query] The portion of the URL from the ? on (i.e. GET variables) associated with the request.
    [ad_conn file] The filepath including filename of the file being served
    [ad_conn request] The number of requests since the server was last started
    [ad_conn start_clicks] The system time when the RP starts handling the request
    Session System Variables: set in sec_handler, check security with ad_validate_security_info
    [ad_conn session_id] The unique session_id coming from the sequence sec_id_seq
    [ad_conn user_id] User_id of a person if the person is logged in. Otherwise, it is blank
    [ad_conn sec_validated] This becomes "secure" when the connection uses SSL
    Database API
    [ad_conn db,handles] What are the list of handles available to AOL?
    [ad_conn db,n_handles_used] How many database handles are currently used?
    [ad_conn db,last_used] Which database handle did we use last?
    [ad_conn db,transaction_level,$db] Specifies what transaction level we are in
    [ad_conn db,db_abort_p,$dbh] Whether the transaction is aborted
    APM
    [ad_conn xml_loaded_p] Checks whether the XML parser is loaded so that it only gets loaded once. Set in apm_load_xml_packages
    Packages
    [ad_conn package_id] The package_id of the package associated with the URL.
    [ad_conn package_url] The URL on which the package is mounted.
    Miscellaneous
    [ad_conn system_p] If true then the request has been made to one of the special directories specified in the config file (somewhere), and no authentication or -authorization has been performed.
    Documentation
    [ad_conn api_page_documentation_mode_p]  
    View comments on this page at openacs.org
    +authorization has been performed.
    Documentation
    [ad_conn api_page_documentation_mode_p]