dotcloud/docker — pull request #2427 by thequux (2013-10-29 01:45:42+00:00)
Title: Make /events API send headers immediately

Go's `net/http` API does not send headers until the first call to `ResponseWriter.Write()`. Ordinarily, this is fine, because in most cases, responses are returned immediately. However, for the events API, nothing is written until some event is sent, which causes timeouts and/or hangs in some HTTP client APIs, which wait for headers before returning from the "make request" call.