security::replace_host_in_url (private)

 security::replace_host_in_url [ -hostname hostname ] url

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

Given a fully qualified url, replace the hostname in this URL with the given hostname.

Switches:
-hostname (optional)
Parameters:
url (required)
Returns:
url with remapped hostname

Partial Call Graph (max 5 caller/called nodes):
%3 security::get_register_subsite security::get_register_subsite (public) security::replace_host_in_url security::replace_host_in_url security::get_register_subsite->security::replace_host_in_url util::join_location util::join_location (public) security::replace_host_in_url->util::join_location

Testcases:
No testcase defined.
Source code:
    set ui [ns_parseurl $url]
    if {[dict exists $ui port]} {
        set _port [dict get $ui port]
    } else {
        set _port ""
    }
    set location [util::join_location  -proto [dict get $ui proto]  -hostname $hostname  -port $_port]
    set elements ""
    if {[dict get $ui path] ne ""} {
        lappend elements [dict get $ui path]
    }
    lappend elements [dict get $ui tail]

    return $location/[join $elements /]
Generic XQL file:
packages/acs-tcl/tcl/security-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/security-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/security-procs-oracle.xql

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