apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.62k stars 802 forks source link

[object_store] fix S3 endpoint and trailing slash result in invalid requests #6641

Closed adbmal closed 3 weeks ago

adbmal commented 3 weeks ago

Which issue does this PR close?

Closes #6580.

Rationale for this change

As #6580 describe: If you pass an endpoint with a trailing slash to AmazonS3Builder::with_endpoint -- e.g. http://some.host:1234/ -- then URLs that are generated will have the form http://some.host:1234//bucket/... (note the double slash). This is rejected by some servers.

What changes are included in this PR?

This PR removes trailing slashes from URLs to prevent invalid request errors.

Are there any user-facing changes?

No

crepererum commented 3 weeks ago

Thank you @adbmal :heart: