[GH-ISSUE #332] Object metadata should be optional in resumable uploads #2214

Open
opened 2026-03-15 18:03:39 +03:00 by kerem · 0 comments
Owner

Originally created by @coryan on GitHub (Sep 19, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/332

When starting a resumable upload the body with object metadata is optional. And at least the C++ client library takes advantage of this. The documentation is not explicit, but there are examples in the documentation that do not use a body:

https://cloud.google.com/storage/docs/performing-resumable-uploads#json-api

An equivalent request fails with fake-gcs-server:

$ curl --verbose -X POST -H 'Content-Length: 0' -H 'Content-Type: application/json'  'http://localhost:4443/storage/v1/b/fake-bucket/o?uploadType=resumable&name=fake-object'
*   Trying ::1:4443...
* Connected to localhost (::1) port 4443 (#0)
> POST /storage/v1/b/fake-bucket/o?uploadType=resumable&name=fake-object HTTP/1.1
> Host: localhost:4443
> User-Agent: curl/7.72.0
> Accept: */*
> Content-Length: 0
> Content-Type: application/json
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Sat, 19 Sep 2020 13:21:25 GMT
< Content-Length: 4
< 
EOF
Originally created by @coryan on GitHub (Sep 19, 2020). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/332 When starting a resumable upload the body with object metadata is optional. And at least the C++ client library takes advantage of this. The documentation is not explicit, but there are examples in the documentation that do not use a body: https://cloud.google.com/storage/docs/performing-resumable-uploads#json-api An equivalent request fails with `fake-gcs-server`: ```console $ curl --verbose -X POST -H 'Content-Length: 0' -H 'Content-Type: application/json' 'http://localhost:4443/storage/v1/b/fake-bucket/o?uploadType=resumable&name=fake-object' * Trying ::1:4443... * Connected to localhost (::1) port 4443 (#0) > POST /storage/v1/b/fake-bucket/o?uploadType=resumable&name=fake-object HTTP/1.1 > Host: localhost:4443 > User-Agent: curl/7.72.0 > Accept: */* > Content-Length: 0 > Content-Type: application/json > * Mark bundle as not supporting multiuse < HTTP/1.1 500 Internal Server Error < Content-Type: text/plain; charset=utf-8 < X-Content-Type-Options: nosniff < Date: Sat, 19 Sep 2020 13:21:25 GMT < Content-Length: 4 < EOF ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#2214
No description provided.