azure/s3 gateways: Pass ETag during GET call to avoid data corruption (#11024)

Both Azure & S3 gateways call for object information before returning
the stream of the object, however, the object content/length could be
modified meanwhile, which means it can return a corrupted object.

Use ETag to ensure that the object was not modified during the GET call
This commit is contained in:
Anis Elleuch
2020-12-17 18:11:14 +01:00
committed by GitHub
parent 970ddb424b
commit cffdb01279
3 changed files with 19 additions and 3 deletions

View File

@@ -168,6 +168,9 @@ type ObjectInfo struct {
// Hex encoded unique entity tag of the object.
ETag string
// The ETag stored in the gateway backend
InnerETag string
// Version ID of this object.
VersionID string