erickguan commented on code in PR #7888:
URL: https://github.com/apache/opendal/pull/7888#discussion_r3548986986
##########
core/services/cos/src/core.rs:
##########
@@ -92,16 +97,80 @@ impl CosCore {
req: Request<T>,
duration: Duration,
) -> Result<Request<T>> {
+ let encoded_query = req.uri().query().map(str::to_string);
let (mut parts, body) = req.into_parts();
self.signer(ctx)
.sign(&mut parts, Some(duration))
.await
.map_err(|e| new_request_sign_error(e.into()))?;
+ Self::restore_encoded_query(&mut parts.uri, encoded_query.as_deref(),
true)?;
Review Comment:
I didn't look into details. Can we build a new parts instead of mutating 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]