Browse code

Merge pull request #22888 from ibuildthecloud/host-compat

Remove DOCKER_HTTP_HOST_COMPAT env var

Alexander Morozov authored on 2016/05/27 06:41:22
Showing 2 changed files
... ...
@@ -114,14 +114,12 @@ func notifyShutdown(err error) {
114 114
 }
115 115
 
116 116
 func wrapListeners(proto string, ls []net.Listener) []net.Listener {
117
-	if os.Getenv("DOCKER_HTTP_HOST_COMPAT") != "" {
118
-		switch proto {
119
-		case "unix":
120
-			ls[0] = &hack.MalformedHostHeaderOverride{ls[0]}
121
-		case "fd":
122
-			for i := range ls {
123
-				ls[i] = &hack.MalformedHostHeaderOverride{ls[i]}
124
-			}
117
+	switch proto {
118
+	case "unix":
119
+		ls[0] = &hack.MalformedHostHeaderOverride{ls[0]}
120
+	case "fd":
121
+		for i := range ls {
122
+			ls[i] = &hack.MalformedHostHeaderOverride{ls[i]}
125 123
 		}
126 124
 	}
127 125
 	return ls
... ...
@@ -850,20 +850,6 @@ set like this:
850 850
     export DOCKER_TMPDIR=/mnt/disk2/tmp
851 851
     /usr/local/bin/dockerd -D -g /var/lib/docker -H unix:// > /var/lib/docker-machine/docker.log 2>&1
852 852
 
853
-Docker clients <= 1.9.2 used an invalid Host header when making request to the
854
-daemon. Docker 1.12 is built using golang 1.6 which is now checking the validity
855
-of the Host header and as such clients <= 1.9.2 can't talk anymore to the daemon.
856
-Docker supports overcoming this issue via a Docker daemon
857
-environment variable. In case you are seeing this error when contacting the
858
-daemon:
859
-
860
-    Error response from daemon: 400 Bad Request: malformed Host header
861
-
862
-The `DOCKER_HTTP_HOST_COMPAT` can be set like this:
863
-
864
-    DOCKER_HTTP_HOST_COMPAT=1 /usr/local/bin/dockerd ...
865
-
866
-
867 853
 ## Default cgroup parent
868 854
 
869 855
 The `--cgroup-parent` option allows you to set the default cgroup parent