_acs-tcl__util__ns_parseurl (private)
_acs-tcl__util__ns_parseurl
Defined in packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ aa_equals "full url, no port" [ns_parseurl http://openacs.org/www/t.html] {proto http host openacs.org path www tail t.html} aa_equals "full url, with port" [ns_parseurl http://openacs.org:80/www/t.html] {proto http host openacs.org port 80 path www tail t.html} aa_equals "full url, no port, no component" [ns_parseurl http://openacs.org/] {proto http host openacs.org path {} tail {}} aa_equals "full url, no port, no component, no trailing slash" [ns_parseurl http://openacs.org] {proto http host openacs.org path {} tail {}} aa_equals "full url, no port, one component" [ns_parseurl http://openacs.org/t.html] {proto http host openacs.org path {} tail t.html} # # relative URLs # aa_equals "relative url" [ns_parseurl /www/t.html] {path www tail t.html} # legacy NaviServer for pre HTTP/1.0, desired? aa_equals "legacy NaviServer, pre HTTP/1.0, no leading /" [ns_parseurl www/t.html] {tail www/t.html} # # protocol relative (protocol agnostic) URLs (contained in RFC 3986) # aa_equals "protocol relative url with port" [ns_parseurl //openacs.org/www/t.html] {host openacs.org path www tail t.html} aa_equals "protocol relative url without port" [ns_parseurl //openacs.org:80/www/t.html] {host openacs.org port 80 path www tail t.html} }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "util__ns_parseurl (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle