Adding content type to images/(name)/get

This commit is contained in:
Frederick F. Kautz IV 2013-11-14 01:05:37 +00:00
parent 844c13bce6
commit 1211065c8d

3
api.go
View file

@ -536,6 +536,9 @@ func postImagesPush(srv *Server, version float64, w http.ResponseWriter, r *http
func getImagesGet(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
name := vars["name"]
if version > 1.0 {
w.Header().Set("Content-Type", "application/x-tar")
}
err := srv.ImageExport(name, w)
if err != nil {
return err