File: urlparse.mli

package info (click to toggle)
zeroinstall-injector 2.18-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,500 kB
  • sloc: ml: 26,524; xml: 2,700; ansic: 319; sh: 236; makefile: 133; python: 105
file content (16 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(* Copyright (C) 2013, Thomas Leonard
 * See the README file for details, or visit http://0install.net.
 *)

(** Helpers for dealing with URLs. *)

(* Note: Ocamlnet has a Neturl package which does all this, but it's too big for us.
 * This is just enough for 0install: we support only http:, https: and ftp: schemes. *)

(* "http://host:port/path?query" -> ("http://host:port", "/path?query")
 * A missing path is returned as "/" *)
val split_path : string -> (string * string)

(** [join_url base url] converts [url] to an absolute URL (if it isn't already), using
 * [base] as the base. *)
val join_url : string -> string -> string