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

(short issue description) #3106

Open
1 task done
alayne-xumo opened this issue Apr 19, 2024 · 0 comments
Open
1 task done

(short issue description) #3106

alayne-xumo opened this issue Apr 19, 2024 · 0 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@alayne-xumo
Copy link

Upcoming End-of-Support

  • I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.

Describe the bug

This bug stems from the fact that s3 "urls" dont conform to the url spec, because they allow things like spaces which for urls have to be encoded. While "s3://mybucket/my key+something" is a valid s3 url it is not a valid url/uri.

So final S3Uri s3Uri = s3.utilities().parseUri(URI.create(s3Url)); results in a parse exception. parseUri should probably accept a string instead of a Uri.

Expected Behavior

I should be able to parse any s3 "url" that will resolve to an object in s3.

Current Behavior

Illegal character in path at index 16: s3://mybucket/my key+something

Reproduction Steps

    try (final S3Client s3 = S3Client.builder()
            .region(Region.US_EAST_1)
            .credentialsProvider(credentialsProvider)
            .build()) {
        final S3Uri s3Uri = s3.utilities().parseUri(URI.create("s3://mybucket/my key+something"));

Possible Solution

parseUri should accept a string.

Additional Information/Context

No response

AWS Java SDK version used

2.20.45

JDK version used

8

Operating System and version

Sonoma

@alayne-xumo alayne-xumo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant