-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(storage): make it possible to disable Content-Type sniffing #9431
feat(storage): make it possible to disable Content-Type sniffing #9431
Conversation
dfba087
to
066692e
Compare
066692e
to
ed35cc7
Compare
@quartzmo Would you mind reviewing this? Thank you! |
af8ffa5
to
d0d0cdf
Compare
Actually this client is own by the @googleapis/cloud-storage-dpe team. They should be the ones to review it, but they should probably respond to the bug you opened first (thanks for doing that). |
@noahdietz Thanks, would appreciate any help getting this pull request and #9430 reviewed. We've been blocked for weeks on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR; added two requests.
6b2356a
to
2c26c72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a fix to the gRPC implementation of the Writer. Otherwise LGTM; thanks for the contribution!
2c26c72
to
3e671a3
Compare
As described in google/go-cloud#3298 (comment), we want to disable automatic `Content-Type` detection when inserting an object to Google Cloud Storage (GCS). Previously it wasn't possible to disable this auto-detection, even though `googleapi.MediaOptions` provides a `ForceEmptyContentType` option (https://github.com/googleapis/google-api-go-client/blob/v0.165.0/googleapi/googleapi.go#L283). We enable this by adding a `Writer` option to set this value. Closes googleapis#9430
3e671a3
to
932bab0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to leave `Content-Type` blank to use the `Response-Content-Type` override in a signed URL. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This commit needs googleapis/google-cloud-go#9431 to work. `go.mod` has been updated to use pseudo-version until cloud.google.com/go/storage v1.39 is available (googleapis/google-cloud-go#9457).
google#3371 made it possible to disable Go Cloud's Content-Type auto-detection via the `DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to keep `Content-Type` blank. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This enables the use of the `Response-Content-Type` override in a signed URL. This commit needs googleapis/google-cloud-go#9431 to work. `go.mod` has been updated to use pseudo-version until cloud.google.com/go/storage v1.39 is available (googleapis/google-cloud-go#9457).
google#3371 made it possible to disable Go Cloud's Content-Type auto-detection via the `DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to keep `Content-Type` blank. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This enables the use of the `Response-Content-Type` override in a signed URL. This commit needs googleapis/google-cloud-go#9431 to work. `go.mod` has been updated to use pseudo-version until cloud.google.com/go/storage v1.39 is available (googleapis/google-cloud-go#9457).
google#3371 made it possible to disable Go Cloud's Content-Type auto-detection via the `DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to keep `Content-Type` blank. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This enables the use of the `Response-Content-Type` override in a signed URL. This commit needs googleapis/google-cloud-go#9431 to work. `go.mod` has been updated to use pseudo-version until cloud.google.com/go/storage v1.39 is available (googleapis/google-cloud-go#9457).
google#3371 made it possible to disable Go Cloud's Content-Type auto-detection via the `DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to keep `Content-Type` blank. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This enables the use of the `Response-Content-Type` override in a signed URL. This commit needs googleapis/google-cloud-go#9431 to work. `go.mod` has been updated to use pseudo-version until cloud.google.com/go/storage v1.39 is available (googleapis/google-cloud-go#9457).
google#3371 made it possible to disable Go Cloud's Content-Type auto-detection via the `DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to keep `Content-Type` blank. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This enables the use of the `Response-Content-Type` override in a signed URL. This commit needs cloud.google.com/go/storage v1.39 (googleapis/google-cloud-go#9431).
google#3371 made it possible to disable Go Cloud's Content-Type auto-detection via the `DisableContentTypeDetection` option. However, the Google Cloud Storage (GCS) driver still performed auto-detection even if this option were enabled, so it was previously not possible to keep `Content-Type` blank. This commit adds the `DisableContentTypeDetection` option to the the driver and passes along the value to make it possible to keep Content-Type blank in the GCS object metadata. This enables the use of the `Response-Content-Type` override in a signed URL. This commit needs cloud.google.com/go/storage v1.39 (googleapis/google-cloud-go#9431).
As described in google/go-cloud#3298 (comment), we want to disable automatic
Content-Type
detection when inserting an object to Google Cloud Storage (GCS).Previously it wasn't possible to disable this auto-detection, even though
googleapi.MediaOptions
provides aForceEmptyContentType
option (https://github.com/googleapis/google-api-go-client/blob/v0.165.0/googleapi/googleapi.go#L283).We enable this by adding a
Writer
option to set this value.Closes #9430