diff --git a/servlet/auth-servlet.go b/servlet/auth-servlet.go index 0014dfe..6dc765b 100644 --- a/servlet/auth-servlet.go +++ b/servlet/auth-servlet.go @@ -78,7 +78,7 @@ func (s *AuthServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Req case ocnc.HTTPRequestHeaderValue_NoAuthProbe_Method_Regist: bInfo := ctx.Request.Header.Peek(ocnc.HTTPRequestHeaderKey_NoAuthProbe_Info) if nil == bInfo { - return nil, fmt.Errorf("Unexpected HTTPRequestHeaderKey NoAuthProbe Info") + return nil, fmt.Errorf("Unexpected Request Header Key NoAuthProbe Info") } rJSON := make([]byte, base64.StdEncoding.DecodedLen(len(bInfo))) _, err := base64.StdEncoding.Decode(rJSON, bInfo) @@ -122,7 +122,7 @@ func (s *AuthServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Req return nil, nil default: - return nil, fmt.Errorf("Unexpected noauth probe httpRequestHeaderValue: %v", method) + return nil, fmt.Errorf("Unexpected noauth probe method: %s", method) } } diff --git a/servlet/data-servlet.go b/servlet/data-servlet.go index a9e4ec3..2066ea6 100644 --- a/servlet/data-servlet.go +++ b/servlet/data-servlet.go @@ -1,20 +1,20 @@ package servlet import ( - "fmt" - "encoding/json" "context" "crypto/rsa" + "encoding/json" + "fmt" "sync" "github.com/valyala/fasthttp" "git.loafle.net/commons/server-go" "git.loafle.net/commons/server-go/socket" - "git.loafle.net/overflow/gateway/external/grpc" - og "git.loafle.net/overflow/gateway" ocpc "git.loafle.net/overflow/commons-go/probe/constants" ocpm "git.loafle.net/overflow/commons-go/probe/model" + og "git.loafle.net/overflow/gateway" + "git.loafle.net/overflow/gateway/external/grpc" ogrs "git.loafle.net/overflow/gateway_rpc/servlet" ) @@ -69,7 +69,7 @@ func (s *DataServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Req switch method { case ocpc.HTTPRequestHeaderValue_Probe_Method_Connect: default: - return nil, fmt.Errorf("Unexpected noauth probe httpRequestHeaderValue: %v", method) + return nil, fmt.Errorf("Unexpected probe method: %s", method) } bProbeKey := ctx.Request.Header.Peek(ocpc.HTTPRequestHeaderKey_Probe_ProbeKey) @@ -107,4 +107,4 @@ func (s *DataServlets) OnConnect(servletCtx server.ServletCtx, conn socket.Conn) func (s *DataServlets) OnDisconnect(servletCtx server.ServletCtx) { s.RPCServlets.OnDisconnect(servletCtx) -} \ No newline at end of file +} diff --git a/servlet/probe-servlet.go b/servlet/probe-servlet.go index 47f06ab..16a82f4 100644 --- a/servlet/probe-servlet.go +++ b/servlet/probe-servlet.go @@ -75,7 +75,7 @@ func (s *ProbeServlets) Handshake(servletCtx server.ServletCtx, ctx *fasthttp.Re switch method { case ocpc.HTTPRequestHeaderValue_Probe_Method_Connect: default: - return nil, fmt.Errorf("Unexpected noauth probe httpRequestHeaderValue: %v", method) + return nil, fmt.Errorf("Unexpected probe method: %s", method) } bProbeKey := ctx.Request.Header.Peek(ocpc.HTTPRequestHeaderKey_Probe_ProbeKey)