uri::split

 uri::split

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::xo::oauth::Signature Class ::xo::oauth::Signature (public) uri::split uri::split Class ::xo::oauth::Signature->uri::split packages/xooauth/www/admin/lti-test.tcl packages/xooauth/ www/admin/lti-test.tcl packages/xooauth/www/admin/lti-test.tcl->uri::split xo::oauth::Signature proc base_string_from_url xo::oauth::Signature proc base_string_from_url (public) xo::oauth::Signature proc base_string_from_url->uri::split

Testcases:
No testcase defined.
Source code:

    set url [string trim $url]
    set scheme {}

    # RFC 1738:    scheme = 1*[ lowalpha | digit | "+" | "-" | "." ]
    regexp -- {^([A-Za-z0-9+.-][A-Za-z0-9+.-]*):} $url dummy scheme

    if {$scheme == {}} {
    set scheme $defaultscheme
    switch -- $scheme {
        http - https - ftp {
        # Force an empty host part
        set url //$url
        }
    }
    }

    # ease maintenance: dynamic dispatch, able to handle all schemes
    # added in future!

    if {[::info procs Split[string totitle $scheme]] == {}} {
    error "unknown scheme '$scheme' in '$url'"
    }

    regsub -- "^${scheme}:" $url {} url

    set       parts(scheme) [string tolower $scheme]
    array set parts [Split[string totitle $scheme$url]

    # should decode all encoded characters!

    return [array get parts]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: