Skip to main content

parse_path

Function parse_path 

Source
pub(crate) fn parse_path(input: &str) -> IResult<&str, (&str, &str)>
Expand description

Parse an S3-style request path into (bucket, object_path).

The expected format is /<bucket>[/<object_path>].

  • /my-bucket("my-bucket", "/")
  • /my-bucket/prefix/key("my-bucket", "/prefix/key")

§Errors

Returns a nom error if the input is empty or does not start with /.