From c977efb6a3de851abd89e4e2ec77f48330c73b95 Mon Sep 17 00:00:00 2001 From: Mihail Tsonev Date: Tue, 6 Mar 2018 17:12:49 +0200 Subject: [PATCH 1/3] Make build script executable --- build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build.sh diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 From a05367339857cc567d43b1160fb8bc1c306d9e21 Mon Sep 17 00:00:00 2001 From: Mihail Tsonev Date: Tue, 6 Mar 2018 18:18:38 +0200 Subject: [PATCH 2/3] Don't log http request during file upload --- vendor/github.com/go-openapi/runtime/client/runtime.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/go-openapi/runtime/client/runtime.go b/vendor/github.com/go-openapi/runtime/client/runtime.go index 48e2f09..325dae6 100644 --- a/vendor/github.com/go-openapi/runtime/client/runtime.go +++ b/vendor/github.com/go-openapi/runtime/client/runtime.go @@ -276,7 +276,8 @@ func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error }) if r.Debug { - b, err2 := httputil.DumpRequestOut(req, true) + var isMultipartRequest = strings.Contains(req.Header.Get("Content-type"), "multipart/form-data") + b, err2 := httputil.DumpRequestOut(req, !isMultipartRequest) if err2 != nil { return nil, err2 } From 8e1b5d5a522fd229952941b662725dd23908819e Mon Sep 17 00:00:00 2001 From: Mihail Tsonev Date: Tue, 6 Mar 2018 15:55:39 +0200 Subject: [PATCH 3/3] Add retrying logic for 4xx errors --- clients/baseclient/client_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/baseclient/client_util.go b/clients/baseclient/client_util.go index 34d6cb0..7191209 100644 --- a/clients/baseclient/client_util.go +++ b/clients/baseclient/client_util.go @@ -31,7 +31,7 @@ func shouldRetry(err error) bool { if ok { httpCode := ae.Code httpCodeMajorDigit := httpCode / 100 - if httpCodeMajorDigit == 5 { + if httpCodeMajorDigit == 5 || httpCodeMajorDigit == 4 { return true } }