fix content-type detection in docker cp

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 90b283c39a36f34ac97f9eb0d66da3a0a9992caa
Component: engine
This commit is contained in:
Victor Vieux
2014-03-17 17:56:21 +00:00
parent 2e43a87446
commit c381c0f9d5

View File

@ -883,7 +883,7 @@ func postContainersCopy(eng *engine.Engine, version version.Version, w http.Resp
var copyData engine.Env
if contentType := r.Header.Get("Content-Type"); contentType == "application/json" {
if contentType := r.Header.Get("Content-Type"); MatchesContentType(contentType, "application/json") {
if err := copyData.Decode(r.Body); err != nil {
return err
}