Skip to content

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

@DMwangnima

Description

@DMwangnima

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions