Golang client fails to attach to streams with "http: invalid Host header" with go1.20.6, go1.19.11Β #45935
Description
Description
Since updating to Golang 1.20.6, the moby Golang client starts failing with http: invalid Host header
errors when used against the default unix socket at least. Normal container operations seem to be fine, but ContainerAttach
and ContainerExecAttach
fail in particular.
I'm assuming this is related to Golang backporting Host header sanitization into 1.20 via golang/go#61076.
Reproduce
Create a container with the Golang client and try to attach to its streams. I can try to cook up a minimal code example if necessary.
Expected behavior
No response
docker version
github.com/docker/docker v24.0.4+incompatible
docker info
Server:
Server Version: 23.0.4
Additional Info
No response