From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- appl/charon/url.m | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 appl/charon/url.m (limited to 'appl/charon/url.m') 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) + # + # ://:@:/;?# + # + # 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; +}; + -- cgit v1.2.3