mirror of https://github.com/docker/docs.git
fix content-type detection in docker cp
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
parent
555c1ef670
commit
90b283c39a
|
|
@ -883,7 +883,7 @@ func postContainersCopy(eng *engine.Engine, version version.Version, w http.Resp
|
||||||
|
|
||||||
var copyData engine.Env
|
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 {
|
if err := copyData.Decode(r.Body); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue