From 1ccf34a67c82866d48f29a5b2573620513092cb1 Mon Sep 17 00:00:00 2001 From: Parnell Springmeyer Date: Fri, 1 Dec 2017 12:46:15 -0600 Subject: [PATCH] Remove response integrity check of config.json and layer This change is being made because the `Docker-Content-Digest` value sent back by docker distribution is a hash digest from the image manifest list when only the image manifest is accepted by the client. This issue on docker distribution tracks the regression: https://github.com/docker/distribution/issues/2395 Fixes #23 Issue #24 tracks reverting this change when the docker distribution issue is resolved. --- src/Network/Wreq/Docker/Image.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Network/Wreq/Docker/Image.hs b/src/Network/Wreq/Docker/Image.hs index 413b352..8a68c19 100644 --- a/src/Network/Wreq/Docker/Image.hs +++ b/src/Network/Wreq/Docker/Image.hs @@ -111,7 +111,7 @@ fetchLayer = writeC <- liftIO $ getConcurrentOutputter liftIO . writeC . Text.unpack $ "Downloading layer: " <> shortRef - fetchedImageLayer <- checkResponseIntegrity' =<< Docker.Registry.fetchLayer ("sha256:" <> layerDigest) + fetchedImageLayer <- Docker.Registry.fetchLayer ("sha256:" <> layerDigest) layerPath <- writeRespBody layerOut layerDigest fetchedImageLayer liftIO . writeC $ Text.unpack ("=> wrote " <> shortRef) @@ -125,7 +125,6 @@ fetchConfig = runHocker $ ask >>= \HockerMeta{..} -> do configDigest <- fetchManifest - >>= checkResponseIntegrity' >>= getConfigDigest . view Wreq.responseBody fetchImageConfig configDigest