Set http status after modifying response headers.

This commit is contained in:
Chris Lu
2015-01-08 00:19:32 -08:00
parent 31979d6192
commit 5b5d6341e5
10 changed files with 87 additions and 88 deletions

View File

@@ -22,7 +22,7 @@ func (fs *FilerServer) moveHandler(w http.ResponseWriter, r *http.Request) {
err := fs.filer.Move(from, to)
if err != nil {
glog.V(4).Infoln("moving", from, "->", to, err.Error())
writeJsonError(w, r, err)
writeJsonError(w, r, http.StatusInternalServerError, err)
} else {
w.WriteHeader(http.StatusOK)
}