Skip to content

Commit 83a689b

Browse files
CLDSRV-839: Add objectSize to DeleteObject
No content length header in a delete
1 parent 797fbe4 commit 83a689b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/api/objectDelete.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ function objectDeleteInternal(authInfo, request, log, isExpiration, cb) {
111111
log.end().addDefaultFields({
112112
bytesDeleted: objMD['content-length'],
113113
});
114+
// Store full object size for server access logs
114115
if (request.serverAccessLog) {
115116
// eslint-disable-next-line no-param-reassign
116117
request.serverAccessLog.analyticsBytesDeleted = objMD['content-length'];
118+
// eslint-disable-next-line no-param-reassign
119+
request.serverAccessLog.objectSize = parseInt(objMD['content-length'], 10);
117120
}
118121
}
119122
return next(null, bucketMD, objMD);

0 commit comments

Comments
 (0)