We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae4fb2c commit 7d1ca7fCopy full SHA for 7d1ca7f
sources/http.go
@@ -67,7 +67,13 @@ func getSourceSize(sourceURI string) (size int) {
67
resp, err := client.Head(sourceURI)
68
69
if err != nil || resp.StatusCode != 200 {
70
- err = fmt.Errorf("HEAD request failed. Please check the URL. Status:%d Error: %v", resp.StatusCode, err)
+ statusCode := ""
71
+ if resp != nil {
72
+ statusCode = fmt.Sprintf(" Status:%d ", resp.StatusCode)
73
+ }
74
+ err = fmt.Errorf("HEAD request failed. Please check the URL.%s Error: %v", statusCode, err)
75
+
76
+ util.PrintfIfDebug("getSourceSize -> %v", err)
77
78
size = getSourceSizeFromByteRangeHeader(sourceURI)
79
return
0 commit comments