(request, response, locations, log, cb)
| 1354 | } |
| 1355 | |
| 1356 | function _performConditionalDelete(request, response, locations, log, cb) { |
| 1357 | const { headers } = request; |
| 1358 | const location = locationConstraints[headers['x-scal-storage-class']]; |
| 1359 | if (!request.headers['if-unmodified-since']) { |
| 1360 | log.debug('unknown last modified time, skipping conditional delete', { |
| 1361 | method: '_performConditionalDelete', |
| 1362 | }); |
| 1363 | return _respond(response, null, log, cb); |
| 1364 | } |
| 1365 | // Azure supports a conditional delete operation. |
| 1366 | if (location && location.type === 'azure') { |
| 1367 | return _azureConditionalDelete(request, response, log, cb); |
| 1368 | } |
| 1369 | // Other clouds do not support a conditional delete. Instead, we |
| 1370 | // conditionally put tags to indicate if it should be deleted by the user. |
| 1371 | return _conditionalTagging(request, response, locations, log, cb); |
| 1372 | } |
| 1373 | |
| 1374 | function _shouldConditionallyDelete(request, locations) { |
| 1375 | if (locations.length === 0) { |
no test coverage detected