Skip to content

Commit

Permalink
Please DeepScan
Browse files Browse the repository at this point in the history
Signed-off-by: Ben <belimele@redhat.com>
  • Loading branch information
Neon-White committed May 7, 2024
1 parent 0024d88 commit 15a63b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/endpoint/s3/ops/s3_delete_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function delete_object(req, res) {
req.headers['x-amz-bypass-governance-retention'].toUpperCase() === 'TRUE' : undefined,
});
if (version_id) {
res.setHeader('x-amz-version-id', version_id;
res.setHeader('x-amz-version-id', version_id);
if (del_res.deleted_delete_marker) {
res.setHeader('x-amz-delete-marker', 'true');
}
Expand Down
1 change: 0 additions & 1 deletion src/endpoint/s3/ops/s3_put_object_retention.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
const S3Error = require('../s3_errors').S3Error;
const s3_utils = require('../s3_utils');
const config = require('../../../../config');
const s3_utils = require('../s3_utils');

/**
* https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectRetention.html
Expand Down
4 changes: 2 additions & 2 deletions src/endpoint/s3/s3_rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async function handle_request(req, res) {
usage_report.s3_usage_info.total_calls += 1;
usage_report.s3_usage_info[op_name] = (usage_report.s3_usage_info[op_name] || 0) + 1;

if (s3_utils.parse_version_id(req?.query?.versionId)) {
if (s3_utils.parse_version_id(req.query?.versionId)) {
const caching = await req.object_sdk.read_bucket_sdk_caching_info(req.params.bucket);
if (caching) {
dbg.error('S3 Version request not (NotImplemented) for buckets with caching', op_name, req.method, req.originalUrl);
Expand Down Expand Up @@ -265,7 +265,7 @@ function _get_method_from_req(req) {
dbg.error(`Got a not supported S3 op ${req.op_name} - doesn't suppose to happen`);
throw new S3Error(S3Error.InternalError);
}
if (s3_utils.parse_version_id(req?.query?.versionId) && s3_op.versioned) {
if (s3_utils.parse_version_id(req.query?.versionId) && s3_op.versioned) {
return s3_op.versioned;
}
return s3_op.regular;
Expand Down

0 comments on commit 15a63b3

Please sign in to comment.