Skip to content

Commit

Permalink
try some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hervedombya committed Nov 30, 2023
1 parent cf94b9d commit 0ab6b13
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/routes/veeam/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function getVeeamFile(request, response, bucketMd, log) {
return responseXMLBody(errors.NoSuchBucket, null, response, log);
}
if ('tagging' in request.query) {
return respondWithData(request, response, log, request.bucketName,
return respondWithData(request, response, log, bucketMd,
buildHeadXML('<Tagging><TagSet></TagSet></Tagging>'));
}
return metadata.getBucket(request.bucketName, log, (err, data) => {
Expand All @@ -38,7 +38,7 @@ function getVeeamFile(request, response, bucketMd, log) {
const builder = new xml2js.Builder({
headless: true,
});
return respondWithData(request, response, log, request.bucketName,
return respondWithData(request, response, log, data,
buildHeadXML(builder.buildObject(fileToBuild.value)), modified);
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/veeam/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function headVeeamFile(request, response, bucketMd, log) {
headless: true,
});
const dataBuffer = Buffer.from(buildHeadXML(builder.buildObject(fileToBuild)));
return responseContentHeaders(null, {}, getResponseHeader(request, request.bucketName,
return responseContentHeaders(null, {}, getResponseHeader(request, data,
dataBuffer, modified, log), response, log);
});
}
Expand Down
4 changes: 2 additions & 2 deletions lib/routes/veeam/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ function listVeeamFiles(request, response, bucketMd, log) {
});
const dataBuffer = Buffer.from(buildHeadXML(builder.buildObject(file)));
filesToBuild.push({
...getResponseHeader(request, request.bucketName,
...getResponseHeader(request, data,
dataBuffer, lastModified, log),
name: file.name,
});
});
// When `versions` is present, listing should return a versioned list
return respondWithData(request, response, log, request.bucketName,
return respondWithData(request, response, log, data,
buildXMLResponse(request, filesToBuild, 'versions' in request.query));
});
}
Expand Down
4 changes: 2 additions & 2 deletions lib/routes/veeam/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function buildHeadXML(xmlContent) {
/**
* Get response headers for the object
* @param {object} request - incoming request
* @param {string} bucket - bucket name
* @param {BucketInfo} bucket - bucket
* @param {string} dataBuffer - data to send as a buffer
* @param {date} [lastModified] - last modified date of the value
* @param {object} log - logging object
Expand Down Expand Up @@ -101,7 +101,7 @@ function getResponseHeader(request, bucket, dataBuffer, lastModified, log) {
* @param {object} request - incoming request
* @param {object} response - response object
* @param {object} log - logging object
* @param {string} bucket - bucket name
* @param {BucketInfo} bucket - bucket info
* @param {string} data - data to send
* @param {date} [lastModified] - last modified date of the value
* @returns {undefined} -
Expand Down

0 comments on commit 0ab6b13

Please sign in to comment.