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)
|
err := c.codec.ReadHeader(&m, codec.Request)
|
||||||
|
|
||||||
// set the method/id
|
// set the method/id
|
||||||
|
r.Method = m.Method
|
||||||
r.Endpoint = m.Endpoint
|
r.Endpoint = m.Endpoint
|
||||||
r.Id = m.Id
|
r.Id = m.Id
|
||||||
|
|
||||||
|
// TODO: remove the old legacy cruft
|
||||||
|
if len(r.Endpoint) == 0 {
|
||||||
|
r.Endpoint = r.Method
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user