Skip to content

path_segments returns None for s3://bucket #1035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Kinrany opened this issue Mar 27, 2025 · 0 comments
Open

path_segments returns None for s3://bucket #1035

Kinrany opened this issue Mar 27, 2025 · 0 comments

Comments

@Kinrany
Copy link

Kinrany commented Mar 27, 2025

The docs for Url::path_segments state:

Unless this URL is cannot-be-a-base, return an iterator of ‘/’ slash-separated path segments, each as a percent-encoded ASCII string.

Return None for cannot-be-a-base URLs.

When Some is returned, the iterator always contains at least one string (which may be empty).

However for a URL like s3://bucket the method returns None despite the URL not being a cannot-be-a-base according to the value's debug representation:

Url { scheme: "s3", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("bucket")), port: None, path: "", query: None, fragment: None }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant