Merge pull request #965 from coreos-inc/v2header
Send Docker-Content-Digest headers on GET requests
This commit is contained in:
commit
cd4d94207b
1 changed files with 6 additions and 2 deletions
|
@ -228,7 +228,9 @@ def fetch_manifest_by_tagname(namespace, repo_name, manifest_ref):
|
|||
if repo is not None:
|
||||
track_and_log('pull_repo', repo)
|
||||
|
||||
return make_response(manifest.json_data, 200)
|
||||
response = make_response(manifest.json_data, 200)
|
||||
response.headers['Docker-Content-Digest'] = manifest.digest
|
||||
return response
|
||||
|
||||
|
||||
@v2_bp.route(MANIFEST_DIGEST_ROUTE, methods=['GET'])
|
||||
|
@ -246,7 +248,9 @@ def fetch_manifest_by_digest(namespace, repo_name, manifest_ref):
|
|||
if repo is not None:
|
||||
track_and_log('pull_repo', repo)
|
||||
|
||||
return make_response(manifest.json_data, 200)
|
||||
response = make_response(manifest.json_data, 200)
|
||||
response.headers['Docker-Content-Digest'] = manifest.digest
|
||||
return response
|
||||
|
||||
|
||||
@v2_bp.route(MANIFEST_TAGNAME_ROUTE, methods=['PUT'])
|
||||
|
|
Reference in a new issue