From e6e4f7c4100608f3732346cb709d9751c33e904e Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sat, 26 Apr 2014 12:20:49 -0600 Subject: [PATCH] agent: Write out the meta data before a potential 404 --- command/agent/kvs_endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/kvs_endpoint.go b/command/agent/kvs_endpoint.go index a72b7286c4..12c6171e58 100644 --- a/command/agent/kvs_endpoint.go +++ b/command/agent/kvs_endpoint.go @@ -47,10 +47,10 @@ func (s *HTTPServer) KVSGet(resp http.ResponseWriter, req *http.Request, args *s // Make the RPC var out structs.IndexedDirEntries - defer setMeta(resp, &out.QueryMeta) if err := s.agent.RPC(method, &args, &out); err != nil { return nil, err } + setMeta(resp, &out.QueryMeta) // Check if we get a not found if len(out.Entries) == 0 {