mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
routes: add Content-Type header for HEAD manifest response
With recent docker client-side changes, on 'docker pull' we see: "Error response from daemon: missing or empty Content-Type header" Hence, set Content-Type header. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
b686a48812
commit
f10c174c0e
@@ -550,6 +550,7 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
||||
resp, err = resty.R().Head(baseURL + "/v2/repo7/manifests/test:1.0")
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 200)
|
||||
So(resp.Header().Get("Content-Type"), ShouldNotBeEmpty)
|
||||
resp, err = resty.R().Get(baseURL + "/v2/repo7/manifests/test:1.0")
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 200)
|
||||
@@ -558,6 +559,7 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
||||
resp, err = resty.R().Head(baseURL + "/v2/repo7/manifests/" + digest.String())
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 200)
|
||||
So(resp.Header().Get("Content-Type"), ShouldNotBeEmpty)
|
||||
resp, err = resty.R().Get(baseURL + "/v2/repo7/manifests/" + digest.String())
|
||||
So(err, ShouldBeNil)
|
||||
So(resp.StatusCode(), ShouldEqual, 200)
|
||||
|
||||
Reference in New Issue
Block a user