mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Add ability to process legacy requests
This commit is contained in:
parent
2cd2258731
commit
f41be53ff8
@ -153,9 +153,15 @@ func (c *rpcCodec) ReadHeader(r *codec.Message, t codec.MessageType) error {
|
||||
err := c.codec.ReadHeader(&m, codec.Request)
|
||||
|
||||
// set the method/id
|
||||
r.Method = m.Method
|
||||
r.Endpoint = m.Endpoint
|
||||
r.Id = m.Id
|
||||
|
||||
// TODO: remove the old legacy cruft
|
||||
if len(r.Endpoint) == 0 {
|
||||
r.Endpoint = r.Method
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user