Skip to content

Commit

Permalink
Merge pull request apache#1087 from rockXiaofeng/Ftr/nilAttachments
Browse files Browse the repository at this point in the history
Bugfix: nil attachments
  • Loading branch information
AlexStocks authored Mar 27, 2021
2 parents 0f6b82c + 699e0e2 commit a773c5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol/dubbo/impl/hessian.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ func unmarshalRequestBody(body []byte, p *DubboPackage) error {
return perrors.WithStack(err)
}

if attachments == nil {
attachments = map[interface{}]interface{}{constant.INTERFACE_KEY: target}
}

if v, ok := attachments.(map[interface{}]interface{}); ok {
v[DUBBO_VERSION_KEY] = dubboVersion
req[6] = ToMapStringInterface(v)
Expand Down

0 comments on commit a773c5f

Please sign in to comment.