Compare commits

...

1 Commits

Author SHA1 Message Date
Bennett Buchanan 4ff79856ae template for fix 2018-04-09 16:00:40 -07:00
4 changed files with 13 additions and 0 deletions

View File

@ -15,6 +15,9 @@ function collectResponseHeaders(objectMD, corsHeaders, versioningCfg,
returnTagCount) {
// Add user meta headers from objectMD
const responseMetaHeaders = Object.assign({}, corsHeaders);
// FIXME: If the value of objectMD['x-amz-website-redirect-location'] is '',
// do not include it in the response.
Object.keys(objectMD).filter(val => (val.substr(0, 11) === 'x-amz-meta-' ||
val === 'x-amz-website-redirect-location'))
.forEach(id => { responseMetaHeaders[id] = objectMD[id]; });

View File

@ -318,6 +318,8 @@ describe('GET object', () => {
return done();
});
});
// TODO: Add test where website redirect header is not given. It
// should not be included in the response.
});
describe('x-amz-tagging-count', () => {

View File

@ -409,5 +409,7 @@ describe('HEAD object, conditions', () => {
done();
});
});
// TODO: Add test for expected head object response.
});
});

View File

@ -19,4 +19,10 @@ describe('Middleware: Collect Response Headers', () => {
undefined);
});
});
// TODO: Add test for 'x-amz-website-redirect-location' when it is an empty
// string: should return undefined for that value.
// TODO: Add test for 'x-amz-website-redirect-location' when it has a value:
// should return the given value.
});