tustvold commented on code in PR #435:
URL:
https://github.com/apache/arrow-rs-object-store/pull/435#discussion_r2199018452
##########
src/client/builder.rs:
##########
@@ -181,9 +181,28 @@ impl HttpRequestBuilder {
pub(crate) fn query<T: serde::Serialize + ?Sized>(mut self, query: &T) ->
Self {
let mut error = None;
if let Ok(ref mut req) = self.request {
- let mut out = format!("{}?", req.uri().path());
- let start_position = out.len();
- let mut encoder = form_urlencoded::Serializer::for_suffix(&mut
out, start_position);
+ // Build the query string, preserving any existing query
parameters.
+ // This prevents malformed URIs like "/bucket?&list-type=2" when
the URI
+ // already contains query parameters.
Review Comment:
Why do we need to handle this case, we didn't before - we solely used the
path?
Was this AI generated or something?
--
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]