* Check that hashedStream.completedHash matches header contentMd5. * @param {object} contentMD5 - content-md5 header * @param {string} completedHash - hashed stream once completed * @param {RequestLogger} log - the current request logger * @return {boolean} - true if contentMD5 match
(contentMD5, completedHash, log)
| 83 | * false otherwise |
| 84 | */ |
| 85 | checkHashMatchMD5(contentMD5, completedHash, log) { |
| 86 | if (contentMD5 && completedHash && contentMD5 !== completedHash) { |
| 87 | log.debug('contentMD5 and completedHash does not match', |
| 88 | { method: 'checkHashMatchMD5', completedHash, contentMD5 }); |
| 89 | return false; |
| 90 | } |
| 91 | return true; |
| 92 | }, |
| 93 | |
| 94 | /** |
| 95 | * Stores object location, custom headers, version etc. |