Browse code

Remove DOCKER_HTTP_HOST_COMPAT env var

Signed-off-by: Darren Shepherd <darren@rancher.com>

Darren Shepherd authored on 2016/05/22 12:40:15
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
... ...
@@ -849,20 +849,6 @@ set like this:
849 849
     export DOCKER_TMPDIR=/mnt/disk2/tmp
850 850
     /usr/local/bin/dockerd -D -g /var/lib/docker -H unix:// > /var/lib/docker-machine/docker.log 2>&1
851 851
 
852
-Docker clients <= 1.9.2 used an invalid Host header when making request to the
853
-daemon. Docker 1.12 is built using golang 1.6 which is now checking the validity
854
-of the Host header and as such clients <= 1.9.2 can't talk anymore to the daemon.
855
-Docker supports overcoming this issue via a Docker daemon
856
-environment variable. In case you are seeing this error when contacting the
857
-daemon:
858
-
859
-    Error response from daemon: 400 Bad Request: malformed Host header
860
-
861
-The `DOCKER_HTTP_HOST_COMPAT` can be set like this:
862
-
863
-    DOCKER_HTTP_HOST_COMPAT=1 /usr/local/bin/dockerd ...
864
-
865
-
866 852
 ## Default cgroup parent
867 853
 
868 854
 The `--cgroup-parent` option allows you to set the default cgroup parent