This commit is contained in:
crusader 2018-04-13 16:21:17 +09:00
parent 8ab605b526
commit a4a77c7088
3 changed files with 9 additions and 9 deletions

View File

@ -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)
}
}

View File

@ -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)

View File

@ -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)