UriView

Implements an RFC 2396 compliant URI specification. See <A HREF="http://ftp.ics.uci.edu/pub/ietf/uri/rfc2396.txt">this page</A> for more information.

The implementation fails the spec on two counts: it doesn't insist on a scheme being present in the UriView, and it doesn't implement the "Relative References" support noted in section 5.2.

Note that IRI support can be implied by assuming each of userinfo, path, query, and fragment are UTF-8 encoded (see <A HREF="http://www.w3.org/2001/Talks/0912-IUC-IRI/paper.html"> this page</A> for further details).

Use a Uri instead where you need to alter specific uri attributes.

Members

Aliases

getDefaultPort
alias getDefaultPort = defaultPort
Undocumented in source.
getFragment
alias getFragment = fragment
Undocumented in source.
getHost
alias getHost = host
Undocumented in source.
getPath
alias getPath = path
Undocumented in source.
getPort
alias getPort = port
Undocumented in source.
getQuery
alias getQuery = query
Undocumented in source.
getUserInfo
alias getUserInfo = userinfo
Undocumented in source.
getValidPort
alias getValidPort = validPort
Undocumented in source.
setFragment
alias setFragment = fragment
Undocumented in source.
setHost
alias setHost = host
Undocumented in source.
setPath
alias setPath = path
Undocumented in source.
setPort
alias setPort = port
Undocumented in source.
setQuery
alias setQuery = query
Undocumented in source.
setUserInfo
alias setUserInfo = userinfo
Undocumented in source.

Enums

InvalidPort
anonymousenum InvalidPort
Undocumented in source.

Functions

defaultPort
int defaultPort(cstring scheme)

Return the default port for the given scheme. InvalidPort is returned if the scheme is unknown, or does not accept a port.

fragment
cstring fragment()

Return the parsed fragment, or null if a fragment was not provided.

getNormalizedScheme
cstring getNormalizedScheme(mstring buffer)

Return the parsed scheme, or null if the scheme was not specified. Automatically normalizes the scheme (converts to lower case)

host
cstring host()

Return the parsed host, or null if the host was not specified

isGeneric
bool isGeneric()

Return whether or not the UriView scheme is considered generic.

path
cstring path()

Return the parsed path, or null if the path was not provided.

port
int port()

Return the parsed port number, or InvalidPort if the port was not provided.

query
cstring query()

Return the parsed query, or null if a query was not provided.

scheme
cstring scheme()

Return the parsed scheme, or null if the scheme was not specified.

toString
istring toString()

Emit the content of this UriView. Output is constructed per RFC 2396.

userinfo
cstring userinfo()

Return the parsed userinfo, or null if userinfo was not provided.

validPort
int validPort()

Return a valid port number by performing a lookup on the known schemes if the port was not explicitly specified.

Meta