mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
srv-mux: do not print peek protocol EOF err msg (#3402)
EOF err message in Peek Protocol is shown when a client closes the connection in the middle of peek protocol, this commit hides it since it doesn't make sense to show it
This commit is contained in:
parent
3b455d6137
commit
5c9a95df32
@ -20,6 +20,7 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@ -75,7 +76,9 @@ func NewConnMux(c net.Conn) *ConnMux {
|
|||||||
func (c *ConnMux) PeekProtocol() string {
|
func (c *ConnMux) PeekProtocol() string {
|
||||||
buf, err := c.bufrw.Peek(maxHTTPVerbLen)
|
buf, err := c.bufrw.Peek(maxHTTPVerbLen)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err != io.EOF {
|
||||||
errorIf(err, "Unable to peek into the protocol")
|
errorIf(err, "Unable to peek into the protocol")
|
||||||
|
}
|
||||||
return "http"
|
return "http"
|
||||||
}
|
}
|
||||||
for _, m := range defaultHTTP1Methods {
|
for _, m := range defaultHTTP1Methods {
|
||||||
|
Loading…
Reference in New Issue
Block a user