mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
Merge pull request #10229 from steven-zou/fix/bug_#10108
fix[scan]:missing header in v1 client
This commit is contained in:
commit
a9bd086b2f
@ -158,6 +158,9 @@ func (c *basicClient) SubmitScan(req *ScanRequest) (*ScanResponse, error) {
|
|||||||
return nil, errors.Wrap(err, "v1 client: submit scan")
|
return nil, errors.Wrap(err, "v1 client: submit scan")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Resolve header
|
||||||
|
def.Resolver(request)
|
||||||
|
|
||||||
respData, err := c.send(request, generalResponseHandler(http.StatusAccepted))
|
respData, err := c.send(request, generalResponseHandler(http.StatusAccepted))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "v1 client: submit scan")
|
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")
|
return "", errors.Wrap(err, "v1 client: get scan report")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Resolve header
|
||||||
|
def.Resolver(req)
|
||||||
|
|
||||||
respData, err := c.send(req, reportResponseHandler())
|
respData, err := c.send(req, reportResponseHandler())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// This error should not be wrapped
|
// This error should not be wrapped
|
||||||
|
Loading…
Reference in New Issue
Block a user