Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Update go-acd vendor to fix error message - fixes #860

Nick Craig-Wood34e7ca90fc70
diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
index a92661761..c70da0413 100644
--- a/Godeps/Godeps.json
+++ b/Godeps/Godeps.json
@@ -190,7 +190,7 @@
},
{
"ImportPath": "github.com/ncw/go-acd",
- "Rev": "fafd639874ad90ef88345a48bd8aeffdbca6480f"
+ "Rev": "a3c3df8bf8c4a3b8c5c0e10ec88e914c68ffa977"
},
{
"ImportPath": "github.com/ncw/swift",
diff --git a/vendor/github.com/ncw/go-acd/client.go b/vendor/github.com/ncw/go-acd/client.go
index 76d8e570c..8e1621446 100644
--- a/vendor/github.com/ncw/go-acd/client.go
+++ b/vendor/github.com/ncw/go-acd/client.go
@@ -14,6 +14,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
+ "strings"
)
const (
@@ -178,16 +179,15 @@ func CheckResponse(r *http.Response) error {
errBody := ""
if data, err := ioutil.ReadAll(r.Body); err == nil {
- errBody = string(data)
+ errBody = strings.TrimSpace(string(data))
}
- errMsg := fmt.Sprintf("HTTP code %v: %q, ", c, r.Status)
+ errMsg := fmt.Sprintf("HTTP code %v: %q: ", c, r.Status)
if errBody == "" {
errMsg += "no response body"
} else {
- errMsg += fmt.Sprintf("reponse body: %v", errBody)
+ errMsg += fmt.Sprintf("response body: %q", errBody)
}
- errMsg += "\n"
return errors.New(errMsg)
}