Skip to content

ParseURIAuthority

[Source]

Parse a standalone authority string ([userinfo@]host[:port]).

Use this for HTTP CONNECT request-targets (authority-form) where the request-target is host:port without a scheme or // prefix. ParseURI would misinterpret host:port as scheme:path.

The @ delimiter is identified by scanning for the last @ in the authority string, following the WHATWG URL Standard convention. RFC 3986 grammar makes the first @ the delimiter (userinfo cannot contain literal @, only %40), but using the last @ is more robust against real-world URIs with unencoded @ in userinfo.

primitive val ParseURIAuthority

Constructors

create

[Source]

new val create()
: ParseURIAuthority val^

Returns


Public Functions

apply

[Source]

fun box apply(
  raw: String val)
: (URIAuthority val | InvalidPort val | InvalidHost val)

Parameters

Returns


eq

[Source]

fun box eq(
  that: ParseURIAuthority val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: ParseURIAuthority val)
: Bool val

Parameters

Returns