From 1fc0bee2acf9b9500f1e7a66890f1c25076032f1 Mon Sep 17 00:00:00 2001 From: ncabatoff Date: Thu, 24 Oct 2019 13:37:13 -0400 Subject: [PATCH] Don't try to use req if we got a nonzero status, it'll be nil. (#7728) --- http/logical.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/logical.go b/http/logical.go index 9a6653383a..445c842b65 100644 --- a/http/logical.go +++ b/http/logical.go @@ -128,7 +128,7 @@ func buildLogicalRequestNoAuth(perfStandby bool, w http.ResponseWriter, r *http. func buildLogicalRequest(core *vault.Core, w http.ResponseWriter, r *http.Request) (*logical.Request, io.ReadCloser, int, error) { req, origBody, status, err := buildLogicalRequestNoAuth(core.PerfStandby(), w, r) - if err != nil { + if err != nil || status != 0 { return nil, nil, status, err }