1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Send error without headers when using chunks

This commit is contained in:
Guillaume J. Charmes 2013-05-28 15:21:06 -07:00
parent cfb8cbe521
commit fe0c0c208c

6
api.go
View file

@ -631,7 +631,7 @@ func postBuild(srv *Server, version float64, w http.ResponseWriter, r *http.Requ
return err return err
} }
file, _, err := r.FormFile("Dockerfile") dockerfile, _, err := r.FormFile("Dockerfile")
if err != nil { if err != nil {
return err return err
} }
@ -644,8 +644,8 @@ func postBuild(srv *Server, version float64, w http.ResponseWriter, r *http.Requ
} }
b := NewBuildFile(srv, utils.NewWriteFlusher(w)) b := NewBuildFile(srv, utils.NewWriteFlusher(w))
if _, err := b.Build(file, context); err != nil { if _, err := b.Build(dockerfile, context); err != nil {
return err fmt.Fprintf(w, "Error build: %s\n", err)
} }
return nil return nil
} }