瀏覽代碼

Fixed the bug that --checksum is not working.

Tatsuhiro Tsujikawa 13 年之前
父節點
當前提交
46e59c4cc3
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/download_helper.cc

+ 2 - 2
src/download_helper.cc

@@ -129,8 +129,8 @@ SharedHandle<RequestGroup> createRequestGroup
     std::string hashType(p.first.first, p.first.second);
     std::string hexDigest(p.second.first, p.second.second);
     util::lowercase(hashType);
-    util::lowercase(hexDigest);
-    dctx->setDigest(hashType, hexDigest);
+    dctx->setDigest(hashType,
+                    util::fromHex(hexDigest.begin(), hexDigest.end()));
   }
 #endif // ENABLE_MESSAGE_DIGEST
   rg->setDownloadContext(dctx);