Skip to content

Commit ab3063e

Browse files
committed
fixup! Support the new API GetObjectAttributes
1 parent 5dd680a commit ab3063e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ const constants = {
279279
rateLimitDefaultConfigCacheTTL: 30000, // 30 seconds
280280
rateLimitDefaultBurstCapacity: 1,
281281
rateLimitCleanupInterval: 10000, // 10 seconds
282-
// Metadata allowed to be returned by getObjectAttributes API
283-
allowedObjectAttributes: new Set([
282+
// Supported attributes for the GetObjectAttributes 'x-amz-optional-attributes' header.
283+
supportedGetObjectAttributes: new Set([
284284
'StorageClass',
285285
'ObjectSize',
286286
'ObjectParts',

lib/api/apiUtils/object/parseAttributesHeader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { errorInstances } = require('arsenal');
2-
const { allowedObjectAttributes } = require('../../../../constants');
2+
const { supportedGetObjectAttributes } = require('../../../../constants');
33

44
/**
55
* parseAttributesHeaders - Parse and validate the x-amz-object-attributes header
@@ -15,7 +15,7 @@ function parseAttributesHeaders(headers) {
1515
);
1616
}
1717

18-
if (attributes.some(attr => !allowedObjectAttributes.has(attr))) {
18+
if (attributes.some(attr => !supportedGetObjectAttributes.has(attr))) {
1919
throw errorInstances.InvalidArgument.customizeDescription('Invalid attribute name specified.');
2020
}
2121

0 commit comments

Comments
 (0)