Compare commits
9 Commits
developmen
...
bugfix/ARS
Author | SHA1 | Date |
---|---|---|
williamlardier | cb03323c13 | |
williamlardier | 21828e6fe7 | |
williamlardier | df6c58df6e | |
williamlardier | 4af9eef84a | |
williamlardier | 99130fe093 | |
williamlardier | 41d21d61d9 | |
williamlardier | 4d7ab6411c | |
williamlardier | af38e8f7af | |
williamlardier | 087c1710bf |
12
index.ts
12
index.ts
|
@ -63,8 +63,8 @@ export const s3routes = {
|
|||
|
||||
export const s3middleware = {
|
||||
userMetadata: require('./lib/s3middleware/userMetadata'),
|
||||
convertToXml: require('./lib/s3middleware/convertToXml'),
|
||||
escapeForXml: require('./lib/s3middleware/escapeForXml'),
|
||||
convertToXml: require('./lib/s3middleware/convertToXml').default,
|
||||
escapeForXml: require('./lib/s3middleware/escapeForXml').default,
|
||||
objectLegalHold: require('./lib/s3middleware/objectLegalHold'),
|
||||
tagging: require('./lib/s3middleware/tagging'),
|
||||
checkDateModifiedHeaders:
|
||||
|
@ -73,16 +73,16 @@ export const s3middleware = {
|
|||
validateConditionalHeaders:
|
||||
require('./lib/s3middleware/validateConditionalHeaders')
|
||||
.validateConditionalHeaders,
|
||||
MD5Sum: require('./lib/s3middleware/MD5Sum'),
|
||||
NullStream: require('./lib/s3middleware/nullStream'),
|
||||
MD5Sum: require('./lib/s3middleware/MD5Sum').default,
|
||||
NullStream: require('./lib/s3middleware/nullStream').default,
|
||||
objectUtils: require('./lib/s3middleware/objectUtils'),
|
||||
azureHelper: {
|
||||
mpuUtils:
|
||||
require('./lib/s3middleware/azureHelpers/mpuUtils'),
|
||||
ResultsCollector:
|
||||
require('./lib/s3middleware/azureHelpers/ResultsCollector'),
|
||||
require('./lib/s3middleware/azureHelpers/ResultsCollector').default,
|
||||
SubStreamInterface:
|
||||
require('./lib/s3middleware/azureHelpers/SubStreamInterface'),
|
||||
require('./lib/s3middleware/azureHelpers/SubStreamInterface').default,
|
||||
},
|
||||
prepareStream: require('./lib/s3middleware/prepareStream'),
|
||||
processMpuParts: require('./lib/s3middleware/processMpuParts'),
|
||||
|
|
|
@ -3,7 +3,7 @@ const UUID = require('uuid');
|
|||
|
||||
const errors = require('../errors').default;
|
||||
const LifecycleRule = require('./LifecycleRule');
|
||||
const escapeForXml = require('../s3middleware/escapeForXml');
|
||||
const escapeForXml = require('../s3middleware/escapeForXml').default;
|
||||
|
||||
const MAX_DAYS = 2147483647; // Max 32-bit signed binary integer.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const assert = require('assert');
|
||||
const UUID = require('uuid');
|
||||
|
||||
const escapeForXml = require('../s3middleware/escapeForXml');
|
||||
const escapeForXml = require('../s3middleware/escapeForXml').default;
|
||||
const errors = require('../errors').default;
|
||||
const { isValidBucketName } = require('../s3routes/routesUtils');
|
||||
|
||||
|
|
|
@ -94,9 +94,7 @@ export const listMultipartUploads = (xmlParams: ListParams) => {
|
|||
params.forEach(param => {
|
||||
if (param.value) {
|
||||
xml.push(
|
||||
`<${param.tag}>
|
||||
${escapeForXml(param.value)}
|
||||
</${param.tag}>`
|
||||
`<${param.tag}>${escapeForXml(param.value)}</${param.tag}>`
|
||||
);
|
||||
} else if (!param.optional) {
|
||||
xml.push(`<${param.tag} />`);
|
||||
|
@ -123,7 +121,7 @@ export const listMultipartUploads = (xmlParams: ListParams) => {
|
|||
`<ID>${escapeForXml(val.Initiator.ID)}</ID>`,
|
||||
`<DisplayName>`,
|
||||
escapeForXml(val.Initiator.DisplayName),
|
||||
'/DisplayName>',
|
||||
'</DisplayName>',
|
||||
'</Initiator>',
|
||||
'<Owner>',
|
||||
`<ID>${escapeForXml(val.Owner.ID)}</ID>`,
|
||||
|
|
|
@ -14,7 +14,7 @@ export function getMetaHeaders(headers: http.IncomingHttpHeaders) {
|
|||
if (!v) return length;
|
||||
return length + k.length + v.toString().length;
|
||||
}, 0);
|
||||
if (totalLength < constants.maximumMetaHeadersSize) {
|
||||
if (totalLength <= constants.maximumMetaHeadersSize) {
|
||||
return Object.fromEntries(filtered);
|
||||
} else {
|
||||
return errors.MetadataTooLarge;
|
||||
|
|
|
@ -3,8 +3,8 @@ const PassThrough = require('stream').PassThrough;
|
|||
const assert = require('assert');
|
||||
|
||||
const errors = require('../../errors').default;
|
||||
const MD5Sum = require('../../s3middleware/MD5Sum');
|
||||
const NullStream = require('../../s3middleware/nullStream');
|
||||
const MD5Sum = require('../../s3middleware/MD5Sum').default;
|
||||
const NullStream = require('../../s3middleware/nullStream').default;
|
||||
const RelayMD5Sum = require('./utils/RelayMD5Sum');
|
||||
const backendUtils = require('./external/utils');
|
||||
const constants = require('../../constants');
|
||||
|
|
|
@ -2,7 +2,7 @@ const AWS = require('aws-sdk');
|
|||
const werelogs = require('werelogs');
|
||||
|
||||
const errors = require('../../../errors').default;
|
||||
const MD5Sum = require('../../../s3middleware/MD5Sum');
|
||||
const MD5Sum = require('../../../s3middleware/MD5Sum').default;
|
||||
const getMetaHeaders =
|
||||
require('../../../s3middleware/userMetadata').getMetaHeaders;
|
||||
const { prepareStream } = require('../../../s3middleware/prepareStream');
|
||||
|
|
|
@ -2,7 +2,7 @@ const url = require('url');
|
|||
|
||||
const azure = require('azure-storage');
|
||||
const errors = require('../../../errors').default;
|
||||
const azureMpuUtils = require('../../../s3middleware/azureHelpers/mpuUtils');
|
||||
const azureMpuUtils = require('../../../s3middleware/azureHelpers/mpuUtils').default;
|
||||
const { validateAndFilterMpuParts } =
|
||||
require('../../../s3middleware/processMpuParts');
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const async = require('async');
|
||||
|
||||
const errors = require('../../../errors').default;
|
||||
const MD5Sum = require('../../../s3middleware/MD5Sum');
|
||||
const MD5Sum = require('../../../s3middleware/MD5Sum').default;
|
||||
const { GCP, GcpUtils } = require('./GCP');
|
||||
const { createMpuKey } = GcpUtils;
|
||||
const AwsClient = require('./AwsClient');
|
||||
|
|
Loading…
Reference in New Issue