diff --git a/cmd/server-mux.go b/cmd/server-mux.go index 503c729fa..6719b0733 100644 --- a/cmd/server-mux.go +++ b/cmd/server-mux.go @@ -20,6 +20,7 @@ import ( "bufio" "crypto/tls" "errors" + "io" "net" "net/http" "net/url" @@ -75,7 +76,9 @@ func NewConnMux(c net.Conn) *ConnMux { func (c *ConnMux) PeekProtocol() string { buf, err := c.bufrw.Peek(maxHTTPVerbLen) if err != nil { - errorIf(err, "Unable to peek into the protocol") + if err != io.EOF { + errorIf(err, "Unable to peek into the protocol") + } return "http" } for _, m := range defaultHTTP1Methods {