Browse code

fix content-type detection in docker cp

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)

Victor Vieux authored on 2014/03/18 02:56:21
Showing 1 changed files
... ...
@@ -883,7 +883,7 @@ func postContainersCopy(eng *engine.Engine, version version.Version, w http.Resp
883 883
 
884 884
 	var copyData engine.Env
885 885
 
886
-	if contentType := r.Header.Get("Content-Type"); contentType == "application/json" {
886
+	if contentType := r.Header.Get("Content-Type"); MatchesContentType(contentType, "application/json") {
887 887
 		if err := copyData.Decode(r.Body); err != nil {
888 888
 			return err
889 889
 		}