Skip to content

Commit

Permalink
use s3_resp.headers in CompleteMultipartUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
lperlaki committed Mar 20, 2024
1 parent 8f33fa6 commit af44a21
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion codegen/src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,13 @@ fn codegen_op_http_call(op: &Operation) {
g!("let fut = async move {{");
g!("let result = s3.{method}(s3_req).await;");
g!("match result {{");
g!("Ok(s3_resp) => Self::serialize_http(s3_resp.output).unwrap(),");
glines![
"Ok(s3_resp) => {
let mut resp = Self::serialize_http(s3_resp.output).unwrap();
resp.headers.extend(s3_resp.headers);
resp
}"
];
g!("Err(err) => super::serialize_error_no_decl(err).unwrap(),");
g!("}}");
g!("}};");
Expand Down
4 changes: 4 additions & 0 deletions crates/s3s/src/keep_alive_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,8 @@ where
}
}
}

fn is_end_stream(&self) -> bool {
self.done
}
}
6 changes: 5 additions & 1 deletion crates/s3s/src/ops/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,11 @@ impl super::Operation for CompleteMultipartUpload {
let fut = async move {
let result = s3.complete_multipart_upload(s3_req).await;
match result {
Ok(s3_resp) => Self::serialize_http(s3_resp.output).unwrap(),
Ok(s3_resp) => {
let mut resp = Self::serialize_http(s3_resp.output).unwrap();
resp.headers.extend(s3_resp.headers);
resp
}
Err(err) => super::serialize_error_no_decl(err).unwrap(),
}
};
Expand Down

0 comments on commit af44a21

Please sign in to comment.