1
0
Fork 0

Don't set content-type header for backup

It was getting prepended to the body of the request, and corrupting
the database. It's set automatically anyway.

Backup now appears functional.
master
Philip O Toole 9 years ago
parent f668f1ad17
commit 947cd053be

@ -156,16 +156,10 @@ func (s *Service) handleBackup(w http.ResponseWriter, r *http.Request) {
return
}
h := http.Header{}
h.Add("Content-Type", "application/octet-stream")
if err := h.Write(w); err != nil {
w.WriteHeader(http.StatusInternalServerError)
return
}
_, err = w.Write(b)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}

Loading…
Cancel
Save