Skip to content

Commit

Permalink
revert fix of BOM prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
miryamfoiferCX committed Sep 11, 2024
1 parent 914521e commit b6af961
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions internal/wrappers/export-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,8 @@ func (e *ExportHTTPWrapper) GetScaPackageCollectionExport(fileURL string) (*ScaP
}
defer resp.Body.Close()

body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}

// Remove BOM if present
body = bytes.TrimPrefix(body, []byte("\xef\xbb\xbf"))

var scaPackageCollection ScaPackageCollectionExport
if err := json.Unmarshal(body, &scaPackageCollection); err != nil {
if err := json.NewDecoder(resp.Body).Decode(&scaPackageCollection); err != nil {
return nil, err
}

Expand Down

0 comments on commit b6af961

Please sign in to comment.