diff options
author | Doug Black <dblack@twilio.com> | 2014-01-28 13:54:09 -0500 |
---|---|---|
committer | Doug Black <dblack@twilio.com> | 2014-01-28 13:54:09 -0500 |
commit | f53e337a27a480a962ef6d1237c8393a618e6db3 (patch) | |
tree | cb52b3b7adee848bf27fe99fd03db848593cc1e8 | |
parent | doc fix (diff) | |
download | sleepy-f53e337a27a480a962ef6d1237c8393a618e6db3.tar.gz sleepy-f53e337a27a480a962ef6d1237c8393a618e6db3.tar.bz2 sleepy-f53e337a27a480a962ef6d1237c8393a618e6db3.zip |
only write header once
-rw-r--r-- | core.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -93,6 +93,7 @@ func (api *API) requestHandler(resource interface{}) http.HandlerFunc { content, err := json.Marshal(data) if err != nil { rw.WriteHeader(http.StatusInternalServerError) + return } rw.WriteHeader(code) rw.Write(content) |