liormizr / s3path

s3path is a pathlib extension for AWS S3 Service
Apache License 2.0
206 stars 39 forks source link

URL Encoder runs even when unnecessary #156

Closed bwacek closed 4 months ago

bwacek commented 6 months ago

When generating the s3 URL, the URL Encoder is engaged to encode any troublesome characters. This works great, but I think I found an issue with it.

Amazon allows some special characters in their S3 key names, such as !, -, _, ., *, ', (, ) according to their documentation located at

When the URL Encoder runs, is runs on anything that usually trips up a URL, but in this case Amazon allows some of the special characters that would trip up a normal URL. The result is that some of the special characters Amazon allows are not allowed natively when using S3Path, as S3Path always encodes them rather than letting Amazon treat them as normal.

I think this could be solved in two different ways:

maresb commented 6 months ago

Thanks for the report! To help with reproducibility, could you please include some explicit test cases that reproduce the exact issue you're describing?

liormizr commented 5 months ago

@bwacek any update on this issue?

bwacek commented 5 months ago

My apologies for the delay in responding.

I started putting together a simple S#Path script to demonstrate the issue, but I haven't been able to repeat it so far. I need to go back to the original code that showed the issue and figure out what is different.

On Sun, Feb 11, 2024 at 7:26 AM liormizr @.***> wrote:

@bwacek https://github.com/bwacek and update on this issue?

— Reply to this email directly, view it on GitHub https://github.com/liormizr/s3path/issues/156#issuecomment-1937681529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADTOXT5QXOR7UOTYMHWBG3YTC2HZAVCNFSM6AAAAABBZXBVRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXGY4DCNJSHE . You are receiving this because you were mentioned.Message ID: @.***>

liormizr commented 4 months ago

Closing this issue for now We can reopen it if needed