Skip to content

Commit

Permalink
Remove response integrity check of config.json and layer
Browse files Browse the repository at this point in the history
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:
distribution/distribution#2395

Fixes #23

Issue #24 tracks reverting this change when the docker distribution
issue is resolved.
  • Loading branch information
ixmatus committed Dec 1, 2017
1 parent 9e10392 commit 1ccf34a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Network/Wreq/Docker/Image.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -125,7 +125,6 @@ fetchConfig =
runHocker $ ask >>= \HockerMeta{..} -> do
configDigest <-
fetchManifest
>>= checkResponseIntegrity'
>>= getConfigDigest . view Wreq.responseBody

fetchImageConfig configDigest
Expand Down

0 comments on commit 1ccf34a

Please sign in to comment.