acs::test::get_url_from_location (public)

 acs::test::get_url_from_location dict

Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl

Determine the URL based on the location field provided from the result dict (as returned from acs::test::http).

Parameters:
dict (required)
dict containing an ns_set called headers
See Also:

Testcases:
fs_add_file_to_folder, create_folder_with_page, create_form_with_form_instance
Source code:
        set location [ns_set iget [dict get $dict headers] Location ""]
        if {$location ne ""} {
            set urlDict [ns_parseurl $location]
            #aa_log "parse URL '$location' => $urlDict"
            if {[dict get $urlDict tail] ne ""} {
                set url [dict get $urlDict path]/[dict get $urlDict tail]
            } else {
                set url [dict get $urlDict path]/
            }
            if {[dict exists $urlDict query]} {
                set query [dict get $urlDict query]
                if {$query ne ""} {
                    append url "?$query"
                }
            }
        } else {
            set url ""
        }
        return $url
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: