agent: Write out the meta data before a potential 404

This commit is contained in:
Armon Dadgar 2014-04-26 12:20:49 -06:00
parent 059d90f81c
commit 778dfb8fd2
1 changed files with 1 additions and 1 deletions

View File

@ -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 {