diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-27 21:44:54 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-27 21:44:54 +0900 |
| commit | 7b86b294c97fbe3eba66b5b994a689598fa0879b (patch) | |
| tree | db0cbdbc04d567126e04d30739fd88ecead4788a /src/HttpResponseCommand.cc | |
| parent | ce101f5ad29bfb37d93f28a117e1963968a061c4 (diff) | |
Consistent naming scheme for hash type and digest.
Diffstat (limited to 'src/HttpResponseCommand.cc')
| -rw-r--r-- | src/HttpResponseCommand.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index c02e324b..60a393e3 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -215,10 +215,10 @@ bool HttpResponseCommand::executeInternal() eoi = checksums.end(); i != eoi; ++i) { if(getDownloadContext()->getChecksumHashAlgo().empty()) { A2_LOG_DEBUG(fmt("Setting digest: type=%s, digest=%s", - (*i).getAlgo().c_str(), - (*i).getMessageDigest().c_str())); - getDownloadContext()->setChecksumHashAlgo((*i).getAlgo()); - getDownloadContext()->setChecksum((*i).getMessageDigest()); + (*i).getHashType().c_str(), + (*i).getDigest().c_str())); + getDownloadContext()->setChecksumHashAlgo((*i).getHashType()); + getDownloadContext()->setChecksum((*i).getDigest()); break; } else { if(checkChecksum(getDownloadContext(), *i)) { @@ -559,8 +559,8 @@ bool HttpResponseCommand::checkChecksum (const SharedHandle<DownloadContext>& dctx, const Checksum& checksum) { - if(dctx->getChecksumHashAlgo() == checksum.getAlgo()) { - if(dctx->getChecksum() == checksum.getMessageDigest()) { + if(dctx->getChecksumHashAlgo() == checksum.getHashType()) { + if(dctx->getChecksum() == checksum.getDigest()) { A2_LOG_INFO("Valid hash found in Digest header field."); return true; } else { |
