Skip to content

Commit

Permalink
feat: do not fail if server returns 200 OK
Browse files Browse the repository at this point in the history
  • Loading branch information
scabala committed Oct 23, 2024
1 parent 1cd90b7 commit 09b1339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvirt/volume_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (i *httpImage) IsQCOW2() (bool, error) {
}
defer response.Body.Close()

if response.StatusCode != http.StatusPartialContent {
if response.StatusCode != http.StatusPartialContent || response.StatusCode != http.StatusOK {

Check failure on line 140 in libvirt/volume_image.go

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, 1.21)

suspect or: response.StatusCode != http.StatusPartialContent || response.StatusCode != http.StatusOK

Check failure on line 140 in libvirt/volume_image.go

View workflow job for this annotation

GitHub Actions / Lint (1.21.x)

bools: suspect or: response.StatusCode != http.StatusPartialContent || response.StatusCode != http.StatusOK (govet)

Check failure on line 140 in libvirt/volume_image.go

View workflow job for this annotation

GitHub Actions / Build (macos-latest, 1.21)

suspect or: response.StatusCode != http.StatusPartialContent || response.StatusCode != http.StatusOK
return false, fmt.Errorf(
"can't retrieve partial header of resource to determine file type: %s - %s",
i.url.String(),
Expand Down

0 comments on commit 09b1339

Please sign in to comment.