Fix content type for schema1 signed manifests
The Payload function for schema1 currently returns a signed manifest, but indicates the content type is that of a manifest that isn't signed. Note that this breaks compatibility with Registry 2.3 alpha 1 and Docker 1.10-rc1, because they use the incorrect content type. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
0640813179
commit
f9a3f028b5
2 changed files with 6 additions and 6 deletions
|
@ -957,7 +957,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName string) manife
|
|||
// Re-push with a few different Content-Types. The official schema1
|
||||
// content type should work, as should application/json with/without a
|
||||
// charset.
|
||||
resp = putManifest(t, "re-putting signed manifest", manifestDigestURL, schema1.MediaTypeManifest, sm2)
|
||||
resp = putManifest(t, "re-putting signed manifest", manifestDigestURL, schema1.MediaTypeSignedManifest, sm2)
|
||||
checkResponse(t, "re-putting signed manifest", resp, http.StatusCreated)
|
||||
resp = putManifest(t, "re-putting signed manifest", manifestDigestURL, "application/json; charset=utf-8", sm2)
|
||||
checkResponse(t, "re-putting signed manifest", resp, http.StatusCreated)
|
||||
|
@ -1486,7 +1486,7 @@ func testManifestAPIManifestList(t *testing.T, env *testEnv, args manifestArgs)
|
|||
t.Fatalf("Error constructing request: %s", err)
|
||||
}
|
||||
req.Header.Set("Accept", manifestlist.MediaTypeManifestList)
|
||||
req.Header.Add("Accept", schema1.MediaTypeManifest)
|
||||
req.Header.Add("Accept", schema1.MediaTypeSignedManifest)
|
||||
req.Header.Add("Accept", schema2.MediaTypeManifest)
|
||||
resp, err = http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue