-
Notifications
You must be signed in to change notification settings - Fork 41
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
URLencoding breakes S3 key #77
Comments
Maybe related to #59 |
I think there is a good discussion to be had regarding the precise meaning of RFC2396, and what smart_open and boto3 mean specifically by "URI", and what the It might be that there are upstream "bugs" in smart_open and/or boto3 regarding the escaping and lack of escaping of URIs. However, I don't yet understand the exact conditions outlined in the RFC for when it's okay to not escape characters in a URI. In my first reading, it appears that the encoding of a URI is context-dependent, and characters only need to be escaped when not escaping them would lead to ambiguity. Thus it may be acceptable behavior to have a URI which is not url-encoded. Some passages from the RFC which support this view:
In smart_open, they provide the following S3 URI template:
I'm not sure to what extent s3path handles the optional components of this URI. In the meantime, I have a patch incoming, which should "fix" the bug so that it gets smart_open working again... |
Thanks @liormizr for the merge!!! |
Deployed |
It looks like #78 broke |
@JohnHBrock can you please send me an example? |
When uploading a file to S3 like this:
The location is transformed and the
=
is urlencoded by aas_uri()
call. In S3 I now have atmp/foo%3Dbar/
prefix. But I expected antmp/foo=bar/
prefix.The
as_uri()
call in s3path.py leads to unexpected behaviour and breakes the behaviour of s3path <=v0.3The text was updated successfully, but these errors were encountered: