Skip to content

initiate_multipart_upload ignores the bucket_as_host #306

@JigarJoshi

Description

@JigarJoshi

While using MP uploads via pre-signed URL on bucket with custom domain pointing to it. Below are the steps code follows

  • Initiate the MP upload (CreateMultipartUpload)
  • Generate pre-signed urls for the parts for this upload.
  • Complete the MP upload.

When using the bucket with custom domain, with config flags bucket_as_host and virtual_host both set to true. The pre-sign URL generation generates the URL of the form

https://<my-bucket-domain>/<key>?....

Correctly but the CreateMultipartUpload has made the underlying HTTP request at the URL

POST https://<my-bucket-domain>/<my-bucket-domain>/<key>?uploads.

This creates the association of the uploadId with the key = <my-bucket-domain>/<key> instead of just <key>. So while using the generated pre-presigned put URL for the parts the upload fails because it fails to validate the key and uploadId mapping.

SDK needs to honor bucket_as_host and virtual_host combination in the CreateMultipartUpload as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions