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:

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_folder_with_page create_folder_with_page (test xowf) acs::test::get_url_from_location acs::test::get_url_from_location test_create_folder_with_page->acs::test::get_url_from_location test_create_form_with_form_instance create_form_with_form_instance (test xowiki) test_create_form_with_form_instance->acs::test::get_url_from_location test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->acs::test::get_url_from_location file_storage::test::add_file_to_folder file_storage::test::add_file_to_folder (private) file_storage::test::add_file_to_folder->acs::test::get_url_from_location file_storage::test::create_new_folder file_storage::test::create_new_folder (private) file_storage::test::create_new_folder->acs::test::get_url_from_location file_storage::test::edit_folder file_storage::test::edit_folder (private) file_storage::test::edit_folder->acs::test::get_url_from_location xowiki::test::create_form xowiki::test::create_form (public) xowiki::test::create_form->acs::test::get_url_from_location xowiki::test::create_form_page xowiki::test::create_form_page (public) xowiki::test::create_form_page->acs::test::get_url_from_location

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: