acs::root_of_host_noncached (private)

 acs::root_of_host_noncached host

Defined in packages/acs-tcl/tcl/request-processor-procs.tcl

Helper function for acs::root_of_host, which performs the actual work.

Parameters:
host (required)

Partial Call Graph (max 5 caller/called nodes):
%3 acs::root_of_host acs::root_of_host (public) acs::root_of_host_noncached acs::root_of_host_noncached acs::root_of_host->acs::root_of_host_noncached rp_lookup_node_from_host rp_lookup_node_from_host (private) acs::root_of_host_noncached->rp_lookup_node_from_host security::provided_host_valid security::provided_host_valid (private) acs::root_of_host_noncached->security::provided_host_valid site_node::get_url site_node::get_url (public) acs::root_of_host_noncached->site_node::get_url util_memoize util_memoize (public) acs::root_of_host_noncached->util_memoize

Testcases:
No testcase defined.
Source code:
    #
    # The main hostname is mounted at /.
    #
    foreach driver {nssock nsssl} {
        set driver_section [ns_driversection -driver $driver]
        set configured_hostname [ns_config $driver_section hostname]
        if { $host eq $configured_hostname } {
            return ""
        }
    }

    if {[security::provided_host_valid $host]} {
        #
        # Other hostnames map to subsites.
        #
        set node_id [util_memoize [list rp_lookup_node_from_host $host]]

        if {$node_id eq ""} {
            set host_stripped [regsub "www\." $host ""]
            if {$host_stripped ne $host} {
                set node_id [util_memoize [list rp_lookup_node_from_host $host_stripped]]
            }
        }

        if { $node_id ne "" } {
            set url [site_node::get_url -node_id $node_id]
            return [string range $url 0 end-1]
        }
    }
    # Hack to provide a useful default
    return ""
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: