sig
type host_t =
H_hostname of string
| H_ip4_addr of Cf_ip4_addr.opaque Cf_ip4_addr.t
type server_t = {
srv_user : string option;
srv_host : Cf_uri.host_t;
srv_port : int option;
}
type authority_t =
A_server of Cf_uri.server_t option
| A_reg_name of string
type segment_t = { seg_name : string; seg_params : string list; }
type net_path_t = {
net_authority : Cf_uri.authority_t;
net_path : Cf_uri.segment_t list;
}
type net_path_v = [ `Net of Cf_uri.net_path_t ]
type abs_path_v = [ `Abs of Cf_uri.segment_t * Cf_uri.segment_t list ]
type rel_path_v = [ `Rel of Cf_uri.segment_t list ]
type path_t =
[ `Abs of Cf_uri.segment_t * Cf_uri.segment_t list
| `Net of Cf_uri.net_path_t
| `Rel of Cf_uri.segment_t list ]
type abs_special_hier_t = {
abs_hier_path :
[ `Abs of Cf_uri.segment_t * Cf_uri.segment_t list
| `Net of Cf_uri.net_path_t ];
abs_hier_query : string option;
}
type abs_special_t =
S_hier of Cf_uri.abs_special_hier_t
| S_opaque of string
type absolute_t = {
abs_scheme : string;
abs_special : Cf_uri.abs_special_t;
}
type relative_t = { rel_path : Cf_uri.path_t; rel_query : string option; }
type t = A of Cf_uri.absolute_t | R of Cf_uri.relative_t
type reference_t = { ref_uri : Cf_uri.t; ref_fragment : string option; }
exception Rel_undefined
val escape : ?allow:(char -> bool) -> string -> string
val unescape : string -> string
val refer_to_base :
base:Cf_uri.absolute_t -> rel:Cf_uri.relative_t -> Cf_uri.absolute_t
val message_to_uri : Cf_message.t -> Cf_uri.t
val message_to_absolute_uri :
base:Cf_uri.absolute_t -> Cf_message.t -> Cf_uri.absolute_t
val message_to_uri_reference : Cf_message.t -> Cf_uri.reference_t
val message_to_absolute_uri_reference :
base:Cf_uri.absolute_t -> Cf_message.t -> Cf_uri.reference_t
val emit_host : Format.formatter -> Cf_uri.host_t -> unit
val emit_server : Format.formatter -> Cf_uri.server_t -> unit
val emit_authority : Format.formatter -> Cf_uri.authority_t -> unit
val emit_path : Format.formatter -> [< Cf_uri.path_t ] -> unit
val emit_abs_special : Format.formatter -> Cf_uri.abs_special_t -> unit
val emit_uri : Format.formatter -> Cf_uri.t -> unit
val emit_uri_reference : Format.formatter -> Cf_uri.reference_t -> unit
val message_of_uri : Cf_uri.t -> Cf_message.t
val message_of_uri_reference : Cf_uri.reference_t -> Cf_message.t
end