blob: 18879da87d0740f6c1bd89b0e55d3ab04e28fab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
Url: module
{
PATH : con "/dis/charon/url.dis";
# "Common Internet Scheme" url syntax (rfc 1808)
#
# <scheme>://<user>:<passwd>@<host>:<port>/<path>;<params>?<query>#<fragment>
#
# relative urls might omit some prefix of the above
# the path of absolute urls include the leading '/'
Parsedurl: adt
{
scheme: string;
user: string;
passwd: string;
host: string;
port: string;
path: string;
params: string;
query: string;
frag: string;
tostring: fn(u: self ref Parsedurl): string;
};
init: fn(): string; # call before anything else
parse: fn(url: string): ref Parsedurl;
mkabs: fn(u, base: ref Parsedurl): ref Parsedurl;
};
|