Skip to content

Commit 3c3cf1d

Browse files
committed
Add content length to GCP multipart complete
This commit fixes the GCP mulipart complete implementation by adding the Content-Length header to the XML request. According to the docs, https://cloud.google.com/storage/docs/xml-api/post-object-complete, this header is required but wasn't being set previously.
1 parent 9d9674b commit 3c3cf1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

object_store/src/gcp/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ impl GoogleCloudStorageClient {
540540
let response = self
541541
.client
542542
.request(Method::POST, &url)
543+
.header(&CONTENT_LENGTH, data.len())
543544
.bearer_auth(&credential.bearer)
544545
.query(&[("uploadId", upload_id)])
545546
.body(data)

0 commit comments

Comments
 (0)