object_store: fix: Incorrect parsing of https Path Style S3 url#4082
Merged
tustvold merged 4 commits intoapache:masterfrom Apr 13, 2023
Merged
object_store: fix: Incorrect parsing of https Path Style S3 url#4082tustvold merged 4 commits intoapache:masterfrom
tustvold merged 4 commits intoapache:masterfrom
Conversation
tustvold
reviewed
Apr 13, 2023
Contributor
tustvold
left a comment
There was a problem hiding this comment.
Should this also parse the bucket from the path of the URL?
Contributor
Author
|
Not sure, but happy to add it. Guess it makes sense, since we cannot work without a bucket. Haven't considered it so far, since we were only processing the host. |
Contributor
Author
|
We are now also checking if the first path segment exists, and assigning it to the bucket. |
tustvold
reviewed
Apr 13, 2023
| Some(("s3", region, "amazonaws", "com")) => { | ||
| self.region = Some(region.to_string()); | ||
| if let Some(bucket) = | ||
| parsed.path_segments().and_then(|mut path| path.next()) |
Contributor
There was a problem hiding this comment.
Could we get a test of this perhaps?
Contributor
Author
There was a problem hiding this comment.
Of course and done - sorry for getting sloppy :).
tustvold
approved these changes
Apr 13, 2023
alamb
pushed a commit
to alamb/arrow-rs
that referenced
this pull request
Mar 20, 2025
…he#4082) * fix: parse reagion from path-style urls, not bucket * fix: test * fix: parse s3 bucket from first path segment * test: add test for parsing bucket from path style url
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.
Which issue does this PR close?
Closes apache/arrow-rs-object-store#175
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?