[#203] Handle special characters in request targets#211
Closed
alanking wants to merge 3 commits into
Closed
Conversation
alanking
commented
Mar 2, 2026
Comment on lines
+50
to
+51
| // If no query parameters delimiter is in the target, then the target and the path are one and the same. | ||
| const auto encoded_path = (params_pos != std::string::npos) ? target.substr(0, params_pos) : target; |
Contributor
Author
There was a problem hiding this comment.
There is an optimization in which target does not need to be copied here. It makes the code slightly messier, but might be worth doing.
Contributor
Author
|
Hmmm... actually, Cyberduck appears to still be having problems with the |
Some clients request URL-encoded object Keys, so these test putting and listing objects with reserved characters which would be URL-encoded if needed. The default encoding type is UTF-8.
Whenever a request is parsed, it encodes special characters so that different parts of the URL can be parsed. While this is helpful and good, these special characters need to be decoded in the target's path so that the object or prefix in question can be referenced properly.
Contributor
Author
|
Added some tests for ListObjectsV2 as well. Again, I think this whole repo needs a refactor as well as a more comprehensive set of tests in addition to testing the S3 clients, but this is all in an effort to get basic functionality for popular Windows GUIs for S3. |
Contributor
Author
|
Gah, sorry for all the noise. I'm going to close this for now. Found some more problems. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #203
Tests are very basic and are based on existing putobject tests, but I'm willing to do a more thorough sweep. Also confirmed working with S3 Browser and Cyberduck.