Merge pull request #2038 from allencloud/make-2xx-response-status-codes-compatile-with-docker

make 2xx response status code compatible with docker engine
This commit is contained in:
Dongluo Chen
2016-03-29 23:06:55 -07:00

View File

@@ -704,7 +704,7 @@ func postImagesCreate(c *context, w http.ResponseWriter, r *http.Request) {
// POST /images/load
func postImagesLoad(c *context, w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
w.WriteHeader(http.StatusOK)
// call cluster to load image on every node
wf := NewWriteFlusher(w)
@@ -1153,6 +1153,7 @@ func postTagImage(c *context, w http.ResponseWriter, r *http.Request) {
httpError(w, err.Error(), http.StatusInternalServerError)
}
}
w.WriteHeader(http.StatusCreated)
}
// Proxy a request to a random node
@@ -1298,6 +1299,7 @@ func postRenameContainer(c *context, w http.ResponseWriter, r *http.Request) {
httpError(w, err.Error(), http.StatusInternalServerError)
}
}
w.WriteHeader(http.StatusNoContent)
}