Skip to content

Commit

Permalink
Merge pull request #46 from jpfuentes2/jf_fix_json_header
Browse files Browse the repository at this point in the history
agent: Ensure we write json header before writing bytes
  • Loading branch information
armon committed Apr 17, 2014
2 parents 484587f + 3506b38 commit a7a51ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/agent/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ func (s *HTTPServer) wrap(handler func(resp http.ResponseWriter, req *http.Reque
if err = enc.Encode(obj); err != nil {
goto HAS_ERR
}
resp.Write(buf.Bytes())
resp.Header().Set("Content-Type", "application/json")
resp.Write(buf.Bytes())
}
}
return f
Expand Down

0 comments on commit a7a51ba

Please sign in to comment.