jkosh44 commented on PR #7301: URL: https://github.com/apache/arrow-rs/pull/7301#issuecomment-2741122624
> That changes the behaviour from uploading an empty object to uploading nothing. The empty part is necessary because otherwise it gets rejected - see the linked issue #5404 My understanding is that the POST for complete (https://cloud.google.com/storage/docs/xml-api/post-object-complete) will get rejected if there's 0 parts, but the DELETE (https://cloud.google.com/storage/docs/xml-api/delete-multipart) will get accepted. The linked issue and PR was from before we were calling `multipart_cleanup`, which submits the DELETE, and we were always submitting the POST. It would seem like a bug on the GCP side to force you to upload an empty part before allowing you to aborting the upload, but it does seem reasonable to force you to upload at least one part to complete it successfully. Still the empty upload isn't hurting anything so it's probably safer to just keep it for now. I've updated it to include the Content-Length header. I've also kept the content length header in the POST, even though it seems clear to me now that it's never validated. The docs say it's required, so we might as well set it. I'm happy to revert though if people disagree. -- 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]
