You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "crepererum (via GitHub)" <gi...@apache.org> on 2024/10/17 15:30:59 UTC
[I] S3 endpoint and trailing slash result in weird/invalid requests [arrow-rs]
crepererum opened a new issue, #6580:
URL: https://github.com/apache/arrow-rs/issues/6580
**Describe the bug**
If you pass an endpoint with a trailing slash to [`AmazonS3Builder::with_endpoint`](https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#method.with_endpoint) -- e.g. `http://some.host:1234/` -- then URLs that are generated will have the form `http://some.host:1234//bucket/...` (not the double slash). This is rejected by some servers.
The issue is kinda elevated by the fact that `with_endpoint` doesn't take a `String` but an `impl Into<String>`. If you combine that with for example [`url::Url`](https://docs.rs/url/latest/url/struct.Url.html), you may get some rather unexpected behavior because:
```rust
#[test]
fn url_to_string() {
let s = "http://localhost:8080"; // no trailing slash!
let u: Url = s.parse().unwrap();
assert_eq!(
u.to_string(),
"http://localhost:8080/", // with trailing slash!
);
}
```
Now one could argue that `Url` is behaving weirdly, but I think it would be nice if `object_store` would be more robust.
**To Reproduce**
See description.
**Expected behavior**
I think `object_store` should accept endpoints with trailing slashes.
**Additional context**
Valid for 9485897ccb6da955a3efeba84e552e85d4efaa20 .
The URL base is generated here:
https://github.com/apache/arrow-rs/blob/9485897ccb6da955a3efeba84e552e85d4efaa20/object_store/src/aws/builder.rs#L964
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] S3 endpoint and trailing slash result in weird/invalid requests [arrow-rs]
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #6580: S3 endpoint and trailing slash result in weird/invalid requests
URL: https://github.com/apache/arrow-rs/issues/6580
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] S3 endpoint and trailing slash result in weird/invalid requests [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6580:
URL: https://github.com/apache/arrow-rs/issues/6580#issuecomment-2741680838
Migrating from arrow-rs issue [#6580](https://github.com/apache/arrow-rs/issues/6580)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] S3 endpoint and trailing slash result in weird/invalid requests [arrow-rs]
Posted by "jatin510 (via GitHub)" <gi...@apache.org>.
jatin510 commented on issue #6580:
URL: https://github.com/apache/arrow-rs/issues/6580#issuecomment-2424903551
can i work on this issue ? @crepererum @tustvold
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] S3 endpoint and trailing slash result in weird/invalid requests [arrow-rs]
Posted by "jatin510 (via GitHub)" <gi...@apache.org>.
jatin510 commented on issue #6580:
URL: https://github.com/apache/arrow-rs/issues/6580#issuecomment-2424902359
take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] S3 endpoint and trailing slash result in weird/invalid requests [arrow-rs]
Posted by "jatin510 (via GitHub)" <gi...@apache.org>.
jatin510 commented on issue #6580:
URL: https://github.com/apache/arrow-rs/issues/6580#issuecomment-2424903604
take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org