This commit is contained in:
folex 2018-08-17 10:15:25 +00:00 committed by GitHub
commit 60387fae58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,7 +198,9 @@ func (s *Server) HandleBzzGet(w http.ResponseWriter, r *http.Request) {
RespondError(w, r, fmt.Sprintf("Had an error building the tarball: %v", err), http.StatusInternalServerError) RespondError(w, r, fmt.Sprintf("Had an error building the tarball: %v", err), http.StatusInternalServerError)
return return
} }
if reader != nil {
defer reader.Close() defer reader.Close()
}
w.Header().Set("Content-Type", "application/x-tar") w.Header().Set("Content-Type", "application/x-tar")
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)