ing
This commit is contained in:
parent
cbd9ce0150
commit
9f519e728e
|
@ -3,6 +3,7 @@ package json
|
|||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"log"
|
||||
|
||||
"git.loafle.net/commons_go/rpc/encode"
|
||||
"git.loafle.net/commons_go/rpc/protocol"
|
||||
|
@ -84,6 +85,7 @@ func newCodecRequest(r io.Reader, encoder encode.Encoder) protocol.CodecRequest
|
|||
// Decode the request body and check if RPC method is valid.
|
||||
req := new(serverRequest)
|
||||
err := json.NewDecoder(r).Decode(req)
|
||||
log.Printf("NewRequest err: %v", err)
|
||||
if err != nil {
|
||||
err = &Error{
|
||||
Code: E_PARSE,
|
||||
|
|
|
@ -103,7 +103,7 @@ func (rr *rpcRegistry) Invoke(contentType string, r io.Reader, w io.Writer, befo
|
|||
// Create a new codec request.
|
||||
codecReq := codec.NewRequest(r)
|
||||
// Get service method to be called.
|
||||
log.Print("codecReq.Method")
|
||||
log.Printf("codecReq.Method: %v", codecReq)
|
||||
method, errMethod := codecReq.Method()
|
||||
if errMethod != nil {
|
||||
return write(codecReq, w, beforeWrite, afterWrite, nil, errMethod)
|
||||
|
|
Loading…
Reference in New Issue
Block a user