MCPcopy Index your code
hub / github.com/scality/cloudserver / _conditionalTagging

Function _conditionalTagging

lib/routes/routeBackbeat.js:1336–1354  ·  view source on GitHub ↗
(request, response, locations, log, cb)

Source from the content-addressed store, hash-verified

1334}
1335
1336function _conditionalTagging(request, response, locations, log, cb) {
1337 return _getLastModified(locations, log, (err, lastModified) => {
1338 if (err) {
1339 return cb(err);
1340 }
1341 const ifUnmodifiedSince = request.headers['if-unmodified-since'];
1342 if (new Date(ifUnmodifiedSince) < new Date(lastModified)) {
1343 log.debug('object has been modified, skipping tagging operation', {
1344 method: '_conditionalTagging',
1345 ifUnmodifiedSince,
1346 lastModified,
1347 key: request.objectKey,
1348 bucket: request.bucketName,
1349 });
1350 return _respond(response, null, log, cb);
1351 }
1352 return _putTagging(request, response, log, cb);
1353 });
1354}
1355
1356function _performConditionalDelete(request, response, locations, log, cb) {
1357 const { headers } = request;

Callers 1

Calls 4

_getLastModifiedFunction · 0.85
_respondFunction · 0.85
_putTaggingFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected