MCPcopy Index your code
hub / github.com/scality/cloudserver / stripTrailingChecksumStream

Function stripTrailingChecksumStream

lib/api/apiUtils/object/prepareStream.js:34–44  ·  view source on GitHub ↗
(stream, log)

Source from the content-addressed store, hash-verified

32}
33
34function stripTrailingChecksumStream(stream, log) {
35 // don't do anything if we are not in the correct integrity check mode
36 if (stream.headers['x-amz-content-sha256'] !== 'STREAMING-UNSIGNED-PAYLOAD-TRAILER') {
37 return stream;
38 }
39
40 const trailingChecksumTransform = new TrailingChecksumTransform(log);
41 stream.pipe(trailingChecksumTransform);
42 trailingChecksumTransform.headers = stream.headers;
43 return trailingChecksumTransform;
44}
45
46module.exports = {
47 prepareStream,

Callers 1

dataStoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected