util_driver_info (public)

 util_driver_info [ -array array ] [ -driver driver ]

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Returns the protocol and port for the specified (or current) driver.

Switches:
-array
(optional)
the array to populate with proto, address and port
-driver
(optional)
the driver to query (defaults to [ad_conn driver])
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_dom_sanitize_html ad_dom_sanitize_html (public) util_driver_info util_driver_info ad_dom_sanitize_html->util_driver_info security::get_http_port security::get_http_port (private) security::get_http_port->util_driver_info security::get_https_port security::get_https_port (private) security::get_https_port->util_driver_info security::get_register_subsite security::get_register_subsite (public) security::get_register_subsite->util_driver_info security::validated_host_header security::validated_host_header (public) security::validated_host_header->util_driver_info ad_conn ad_conn (public) util_driver_info->ad_conn

Testcases:
No testcase defined.
Source code:

    if {$driver eq ""} {
        set driver [ad_conn driver]
    }

    set section [ns_driversection -driver $driver]

    switch -glob -- $driver {
        nsudp* -
        nssock* {
            set d [list proto http port [ns_config -int $section Port] address [ns_config $section address]]
        }
        nsunix {
            set d [list proto http port "" address ""]
        }
        nsssl* - nsssle {
            set d [list proto https port [ns_config -int $section Port] address [ns_config $section address]]
        }
        nsopenssl {
            set d [list proto https port [ns_config -int $section ServerPort] address [ns_config $section address]]
        }
        default {
            #ns_log notice "Unknown driver: [ad_conn driver]. Only know nssock, nsunix, nsssl, nsssle, nsopenssl"
            set d [list proto http port [ns_config -int $section Port] address [ns_config $section address]]
        }
    }
    lappend d hostname [ns_config $section hostname]

    if {[info exists array]} {
        upvar $array result
        array set result $d
    }
    return $d
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: