Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object metadata should be optional in resumable uploads #332

Open
coryan opened this issue Sep 19, 2020 · 0 comments
Open

Object metadata should be optional in resumable uploads #332

coryan opened this issue Sep 19, 2020 · 0 comments

Comments

@coryan
Copy link

coryan commented Sep 19, 2020

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
@fsouza fsouza added bug and removed hacktoberfest labels Feb 15, 2021
martinzink added a commit to martinzink/fake-gcs-server that referenced this issue Feb 24, 2022
martinzink added a commit to martinzink/fake-gcs-server that referenced this issue Feb 24, 2022
martinzink added a commit to martinzink/fake-gcs-server that referenced this issue Mar 1, 2022
martinzink added a commit to martinzink/fake-gcs-server that referenced this issue Mar 1, 2022
martinzink added a commit to martinzink/fake-gcs-server that referenced this issue Mar 2, 2022
fsouza added a commit that referenced this issue Mar 8, 2022
* Object metadata should be optional in resumable uploads #332
added cpp examples

* Update fakestorage/upload.go

Co-authored-by: fsouza <108725+fsouza@users.noreply.github.com>

* added cpp to ci

* change google-cloud-cpp to release v1.37.0

* retain err check with smaller scope
resumableUpload tests without initial body

Co-authored-by: fsouza <108725+fsouza@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants