-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This makes sure that the conversion is a one-way street and the canonical URLs, whatever they might be will not be used for any other purposes but `pp` and (more importantly) `equal`.
- Loading branch information
1 parent
792648e
commit 04338f4
Showing
4 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
val canonicalize : Uri.t -> Uri.t | ||
(** Returns a canonical representation of the URI *) | ||
(** One way normalization of URIs. | ||
Not meant to expose the normalized value of the URI again *) | ||
module Normalized : sig | ||
type t | ||
(** Abstracts away the actual value which is not to be used directly *) | ||
|
||
val of_uri : Uri.t -> t | ||
(** Returns a canonical representation of the URI *) | ||
|
||
val equal : t -> t -> bool | ||
(** Determines whether two normalized URIs are equal *) | ||
|
||
val pp : t Fmt.t | ||
(** Pretty printer for normalized URLs. *) | ||
|
||
(**/**) | ||
|
||
module Private : sig | ||
val unescaped : Uri.t -> t | ||
(** Convert a [Uri.t] into a [t] without escaping. Only used for testing | ||
purposes, as it breaks the security guarantees. *) | ||
end | ||
|
||
(**/**) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters