-
Notifications
You must be signed in to change notification settings - Fork 24
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
Percent decode the list files when parsing response #93
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #93 +/- ##
==========================================
+ Coverage 90.23% 90.31% +0.07%
==========================================
Files 29 29
Lines 1372 1383 +11
==========================================
+ Hits 1238 1249 +11
Misses 134 134
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I had completely missed the fact they are encoding the keys.
// #[serde(rename = "EncodingType")] | ||
// encoding_type: String, | ||
#[serde(rename = "EncodingType")] | ||
encoding_type: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wandering whether this should be an enum or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like an Option<String>
?
Since there is an official S3 specification, as far as I know, I have no idea.
What I can say is that DO, minio, and was all return the encoding_type
set to url
. But maybe some other providers don't.
I would say we keep it like that until someone gives us an implementation that doesn't work like that personally 😅
Hey, sorry I was on vacation last week. |
Hello, while trying out the
ListObjectsV2::parse_response
command I noticed that we were not percent decoding the keys as documented here: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_RequestSyntaxI had no issue with
minio
as I don't use any strange characters. But the Digital Ocean S3 implementation does percent-encode the/
character, which completely broke my code.I updated my lib, but I think it should be handled by rusty_s3 directly, personally 🤔
What do you think?