dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case

Open DMwangnima opened this issue 1 year ago • 0 comments

Environment

  • Server: Dubbo-go, v3.1.0
  • Client: Dubbo-go, v3.1.0
  • Protocol: Dubbo

Issue description

defining API

type UserProvider struct {
    Echo func(ctx context.Context, req *int32) (*int32, error)
}

client logic

resp, err := cli.Echo(context.Background(), (*int32)(nil))

dubbo-go-hessian2

image

Judging v == nil is not enough since (*int32)(nil) has type information.

dubbo-go

/protocol/dubbo/impl/hessian.go image

ignore encoding error does not make any sense.

Logs

Click me to check logs
Copy logs to here.

DMwangnima avatar Nov 21 '23 14:11 DMwangnima