Skip to content

Commit

Permalink
Merge pull request moby#22888 from ibuildthecloud/host-compat
Browse files Browse the repository at this point in the history
Remove DOCKER_HTTP_HOST_COMPAT env var
  • Loading branch information
LK4D4 committed May 26, 2016
2 parents 11ddfa4 + 989f6f8 commit ef89891
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
14 changes: 6 additions & 8 deletions cmd/dockerd/daemon_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@ func notifyShutdown(err error) {
}

func wrapListeners(proto string, ls []net.Listener) []net.Listener {
if os.Getenv("DOCKER_HTTP_HOST_COMPAT") != "" {
switch proto {
case "unix":
ls[0] = &hack.MalformedHostHeaderOverride{ls[0]}
case "fd":
for i := range ls {
ls[i] = &hack.MalformedHostHeaderOverride{ls[i]}
}
switch proto {
case "unix":
ls[0] = &hack.MalformedHostHeaderOverride{ls[0]}
case "fd":
for i := range ls {
ls[i] = &hack.MalformedHostHeaderOverride{ls[i]}
}
}
return ls
Expand Down
14 changes: 0 additions & 14 deletions docs/reference/commandline/dockerd.md
Original file line number Diff line number Diff line change
Expand Up @@ -850,20 +850,6 @@ set like this:
export DOCKER_TMPDIR=/mnt/disk2/tmp
/usr/local/bin/dockerd -D -g /var/lib/docker -H unix:// > /var/lib/docker-machine/docker.log 2>&1
Docker clients <= 1.9.2 used an invalid Host header when making request to the
daemon. Docker 1.12 is built using golang 1.6 which is now checking the validity
of the Host header and as such clients <= 1.9.2 can't talk anymore to the daemon.
Docker supports overcoming this issue via a Docker daemon
environment variable. In case you are seeing this error when contacting the
daemon:

Error response from daemon: 400 Bad Request: malformed Host header

The `DOCKER_HTTP_HOST_COMPAT` can be set like this:

DOCKER_HTTP_HOST_COMPAT=1 /usr/local/bin/dockerd ...


## Default cgroup parent
The `--cgroup-parent` option allows you to set the default cgroup parent
Expand Down

0 comments on commit ef89891

Please sign in to comment.