summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xenolf/lego/acme/jws.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-04-24 20:11:36 -0400
committerJoram Wilander <jwawilander@gmail.com>2017-04-24 20:11:36 -0400
commitf5437632f486b7d0a0a181c58f113c86d032b02c (patch)
tree407388e3003a210a89f4b2128d7ad656f8b79d26 /vendor/github.com/xenolf/lego/acme/jws.go
parent7f68a60f8c228d5604e0566bf84cabb145d16c37 (diff)
downloadchat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.gz
chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.bz2
chat-f5437632f486b7d0a0a181c58f113c86d032b02c.zip
Upgrading server dependancies (#6215)
Diffstat (limited to 'vendor/github.com/xenolf/lego/acme/jws.go')
-rw-r--r--vendor/github.com/xenolf/lego/acme/jws.go16
1 files changed, 1 insertions, 15 deletions
diff --git a/vendor/github.com/xenolf/lego/acme/jws.go b/vendor/github.com/xenolf/lego/acme/jws.go
index 3b77cd491..a39434342 100644
--- a/vendor/github.com/xenolf/lego/acme/jws.go
+++ b/vendor/github.com/xenolf/lego/acme/jws.go
@@ -44,26 +44,12 @@ func (j *jws) post(url string, content []byte) (*http.Response, error) {
if err != nil {
return nil, fmt.Errorf("Failed to HTTP POST to %s -> %s", url, err.Error())
}
-
- // Even in case of an error, the response should still contain a nonce.
+
nonce, nonceErr := getNonceFromResponse(resp)
if nonceErr == nil {
j.nonces.Push(nonce)
}
- if err != nil {
- switch err.(type) {
- case NonceError:
- // In case of a nonce error - retry once
- resp, err = httpPost(url, "application/jose+json", bytes.NewBuffer([]byte(signedContent.FullSerialize())))
- if err != nil {
- return nil, fmt.Errorf("Failed to HTTP POST to %s -> %s", url, err.Error())
- }
- default:
- return nil, fmt.Errorf("Failed to HTTP POST to %s -> %s", url, err.Error())
- }
- }
-
return resp, nil
}