mirror of
https://github.com/minio/minio.git
synced 2025-12-08 08:42:43 -05:00
Update GCS storage library to support GetObject API on gzipped objects (#6506)
Fixes #6280
This commit is contained in:
9
vendor/cloud.google.com/go/storage/not_go17.go
generated
vendored
9
vendor/cloud.google.com/go/storage/not_go17.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017 Google Inc. All Rights Reserved.
|
||||
// Copyright 2017 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -24,3 +24,10 @@ func withContext(r *http.Request, _ interface{}) *http.Request {
|
||||
// In Go 1.6 and below, ignore the context.
|
||||
return r
|
||||
}
|
||||
|
||||
// Go 1.6 doesn't have http.Response.Uncompressed, so we can't know whether the Go
|
||||
// HTTP stack uncompressed a gzip file. As a good approximation, assume that
|
||||
// the lack of a Content-Length header means that it did uncompress.
|
||||
func goHTTPUncompressed(res *http.Response) bool {
|
||||
return res.Header.Get("Content-Length") == ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user