mirror of
https://github.com/minio/minio.git
synced 2025-01-23 04:33:15 -05: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…
x
Reference in New Issue
Block a user