{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15276","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15276/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15276/comments","events_url":"https://api.github.com/repos/golang/go/issues/15276/events","html_url":"https://github.com/golang/go/issues/15276","id":148074692,"number":15276,"title":"golang 1.6 host header parsing changed","user":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars.githubusercontent.com/u/799078?v=3","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-13T14:13:10Z","updated_at":"2016-04-13T14:28:18Z","closed_at":"2016-04-13T14:28:18Z","body":"1. What version of Go are you using (`go version`)?\r\n1.6\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/go:/go/src/github.com/docker/docker/vendor\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/linux_amd64\"\r\nGO15VENDOREXPERIMENT=\"\"\r\nCC=\"gcc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\n```\r\n\r\n3. What did you do?\r\nSee docker/docker#20865\r\n\r\nBasically, on older docker clients ( < docker 1.10) docker was setting an invalid host header when using unix sockets. Go versions prior to 1.6 accepted this header just fine, go 1.6 does not.\r\nThis was fixed in the Docker 1.10 client, however is a problem for older clients talking to docker binary compiled against go 1.6.\r\n\r\nWith the invalid host header, golang 1.6 (correctly) causes the http server in the docker daemon to reject the request with:\r\n```\r\n400 Bad Request: malformed Host header\r\n```\r\n\r\nThis is obviously a bug in the older Docker clients, but it means that newer versions of Docker daemon can not be compiled with go 1.6 unless we decide to break compatibility with older clients or have some nasty hacks in the http server.\r\n\"Older\" clients here means clients that are as young as 4 months old, currently.\r\n\r\n4. What did you expect to see?\r\nUnsure.\r\nThe Go 1.6 behavior is the \"correct\" behavior for dealing with the invalid header.\r\nIdeally, I think we would like to be able to have a path to upgrade to 1.6 (and beyond) without breaking compatibility with older clients.\r\nDefinitely open to suggestions.\r\n\r\n5. What did you see instead?\r\nThe old, invalid host headers are rejected by the http server with: \r\n```\r\n400 Bad Request: malformed Host header\r\n```"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/209474035","html_url":"https://github.com/golang/go/issues/15276#issuecomment-209474035","issue_url":"https://api.github.com/repos/golang/go/issues/15276","id":209474035,"user":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T14:28:18Z","updated_at":"2016-04-13T14:28:18Z","body":"Closing, because there's nothing to do here. The actionable bug is #14952"}}