fix: rename audit log docs and datastructure

This commit is contained in:
Harshavardhana
2021-01-26 13:39:55 -08:00
parent 00cff1aac5
commit 6717295e18
3 changed files with 22 additions and 19 deletions

View File

@@ -455,9 +455,9 @@ func (s *erasureSets) cleanupStaleUploads(ctx context.Context, cleanupInterval,
const objectErasureMapKey = "objectErasureMap"
type auditObjectOp struct {
Pool int `json:"pool"`
Set int `json:"set"`
BackendServers []string `json:"backendServers"`
Pool int `json:"poolId"`
Set int `json:"setId"`
Disks []string `json:"disks"`
}
func auditObjectErasureSet(ctx context.Context, object string, set *erasureObjects, poolNum int) {
@@ -468,9 +468,9 @@ func auditObjectErasureSet(ctx context.Context, object string, set *erasureObjec
object = decodeDirObject(object)
op := auditObjectOp{
Pool: poolNum + 1,
Set: set.setNumber + 1,
BackendServers: set.getEndpoints(),
Pool: poolNum + 1,
Set: set.setNumber + 1,
Disks: set.getEndpoints(),
}
var objectErasureSetTag map[string]auditObjectOp

View File

@@ -68,7 +68,9 @@ func ToEntry(w http.ResponseWriter, r *http.Request, reqClaims map[string]interf
for k, v := range wh {
respHeader[k] = strings.Join(v, ",")
}
respHeader[xhttp.ETag] = strings.Trim(respHeader[xhttp.ETag], `"`)
if etag := respHeader[xhttp.ETag]; etag != "" {
respHeader[xhttp.ETag] = strings.Trim(etag, `"`)
}
entry := Entry{
Version: Version,