mirror of
https://github.com/minio/minio
synced 2024-09-06 00:37:25 +00:00
Add compression scheme to header (#15395)
For easier debugging. We still do not return compressed size for security reasons.
This commit is contained in:
parent
7725425e05
commit
3795b2c8ba
|
@ -199,5 +199,12 @@ func setObjectHeaders(w http.ResponseWriter, objInfo ObjectInfo, rs *HTTPRangeSp
|
|||
lc.SetPredictionHeaders(w, objInfo.ToLifecycleOpts())
|
||||
}
|
||||
|
||||
if v, ok := objInfo.UserDefined[ReservedMetadataPrefix+"compression"]; ok {
|
||||
if i := strings.LastIndexByte(v, '/'); i >= 0 {
|
||||
v = v[i+1:]
|
||||
}
|
||||
w.Header()[xhttp.MinIOCompressed] = []string{v}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -187,6 +187,9 @@ const (
|
|||
MinIOSourceObjectLegalHoldTimestamp = "X-Minio-Source-Replication-LegalHold-Timestamp"
|
||||
// predicted date/time of transition
|
||||
MinIOTransition = "X-Minio-Transition"
|
||||
|
||||
// MinIOCompressed is returned when object is compressed
|
||||
MinIOCompressed = "X-Minio-Compressed"
|
||||
)
|
||||
|
||||
// Common http query params S3 API
|
||||
|
|
Loading…
Reference in a new issue