Skip to content

Uri.path broken ? #167

@cuihtlauac

Description

@cuihtlauac

I believe the behaviour of Uri.path is wrong when it is passed a Uri beginning with exactly two slashes. In such case, it drops everything before the third slash

#require "uri-sexp";;
utop # "aaa/bbb" |> Uri.of_string |> Uri.path;;
- : string = "aaa/bbb"
utop # "/aaa/bbb" |> Uri.of_string |> Uri.path;;
- : string = "/aaa/bbb"
utop # "//aaa/bbb" |> Uri.of_string |> Uri.path;; (* Boom! *)
- : string = "/bbb"
utop # "///aaa/bbb" |> Uri.of_string |> Uri.path;;
- : string = "/aaa/bbb"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions