Skip to content
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

ObjectStore parse_url Incorrectly Handles URLs with Spaces #5017

Closed
tustvold opened this issue Nov 1, 2023 · 1 comment · Fixed by #5018
Closed

ObjectStore parse_url Incorrectly Handles URLs with Spaces #5017

tustvold opened this issue Nov 1, 2023 · 1 comment · Fixed by #5018
Labels
bug object-store Object Store Interface

Comments

@tustvold
Copy link
Contributor

tustvold commented Nov 1, 2023

Describe the bug

ObjectStore::parse_url does not correctly decode URL paths, resulting in incorrect behaviour for paths containing spaces (or other non URL-safe characters).

To Reproduce

Expected behavior

#[test]
fn test_url_spaces() {
    let url = Url::parse("file:///my file with spaces").unwrap();
    assert_eq!(url.path(), "/my%20file%20with%20spaces");
    let (_, path) = parse_url(&url).unwrap();
    assert_eq!(path.as_ref(), "my file with spaces");
}

Additional context

Relates to apache/datafusion#8012 and apache/datafusion#7877

@tustvold tustvold added the bug label Nov 1, 2023
tustvold added a commit to tustvold/arrow-rs that referenced this issue Nov 1, 2023
tustvold added a commit that referenced this issue Nov 1, 2023
@tustvold tustvold added the object-store Object Store Interface label Nov 2, 2023
@tustvold
Copy link
Contributor Author

tustvold commented Nov 2, 2023

label_issue.py automatically added labels {'object-store'} from #5018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug object-store Object Store Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant