From 27420b866099ac8ac8d286965af01c7df8b1d172 Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Wed, 11 Dec 2019 17:10:57 +0800 Subject: [PATCH] fix[scan]:missing header in v1 client - add the missing resolver calls to the v1 client fix #10108 Signed-off-by: Steven Zou --- src/pkg/scan/rest/v1/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pkg/scan/rest/v1/client.go b/src/pkg/scan/rest/v1/client.go index a24eba3fb..b6c65cdb2 100644 --- a/src/pkg/scan/rest/v1/client.go +++ b/src/pkg/scan/rest/v1/client.go @@ -158,6 +158,9 @@ func (c *basicClient) SubmitScan(req *ScanRequest) (*ScanResponse, error) { return nil, errors.Wrap(err, "v1 client: submit scan") } + // Resolve header + def.Resolver(request) + respData, err := c.send(request, generalResponseHandler(http.StatusAccepted)) if err != nil { return nil, errors.Wrap(err, "v1 client: submit scan") @@ -188,6 +191,9 @@ func (c *basicClient) GetScanReport(scanRequestID, reportMIMEType string) (strin return "", errors.Wrap(err, "v1 client: get scan report") } + // Resolve header + def.Resolver(req) + respData, err := c.send(req, reportResponseHandler()) if err != nil { // This error should not be wrapped