AdamGS commented on code in PR #334: URL: https://github.com/apache/arrow-rs-object-store/pull/334#discussion_r2046482455
########## src/client/builder.rs: ########## @@ -252,12 +252,18 @@ where let mut out = match parts.path_and_query { Some(p) => match p.query() { - Some(x) => format!("{}?{}", p.path(), x), + Some(query) => format!("{}?{}", p.path(), query), None => format!("{}?", p.path()), }, None => "/?".to_string(), }; - let mut serializer = form_urlencoded::Serializer::new(&mut out); + let mut serializer = if out.ends_with('?') { + let start_position = out.len(); + form_urlencoded::Serializer::for_suffix(&mut out, start_position) + } else { + form_urlencoded::Serializer::new(&mut out) + }; Review Comment: This code path had the same kind of "bug", modified the relevant test to catch it. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org