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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
