From 34e7ca90fc70c3bed97fbd13ad80c7854c438ebd Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 7 Nov 2016 10:20:26 +0000 Subject: [PATCH] Update go-acd vendor to fix error message - fixes #860 --- Godeps/Godeps.json | 2 +- vendor/github.com/ncw/go-acd/client.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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) }