summaryrefslogtreecommitdiff
path: root/appl/charon/url.m
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 17:07:39 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 17:07:39 +0000
commit37da2899f40661e3e9631e497da8dc59b971cbd0 (patch)
treecbc6d4680e347d906f5fa7fca73214418741df72 /appl/charon/url.m
parent54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff)
20060303a
Diffstat (limited to 'appl/charon/url.m')
-rw-r--r--appl/charon/url.m30
1 files changed, 30 insertions, 0 deletions
diff --git a/appl/charon/url.m b/appl/charon/url.m
new file mode 100644
index 00000000..18879da8
--- /dev/null
+++ b/appl/charon/url.m
@@ -0,0 +1,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;
+};
+