diff --git a/router/dealer.go b/router/dealer.go index 41a6e488..e1c615ac 100644 --- a/router/dealer.go +++ b/router/dealer.go @@ -627,7 +627,10 @@ func (d *Dealer) call(caller *session, msg *wamp.Call) { Details: wamp.Dict{}, Error: wamp.ErrOptionDisallowedDiscloseMe, }) - } else if callee.HasFeature(roleCallee, featureCallerIdent) { + // don't continue a call when discloseMe was disallowed. + return + } + if callee.HasFeature(roleCallee, featureCallerIdent) { discloseCaller(caller, details) } } @@ -644,6 +647,11 @@ func (d *Dealer) call(caller *session, msg *wamp.Call) { } } + if reg.match != wamp.MatchExact { + // according to the spec, a router has to provide the actual procedure to the client. + details[wamp.OptProcedure] = msg.Procedure + } + d.calls[msg.Request] = caller invocationID := d.idGen.Next() d.invocations[invocationID] = &invocation{ diff --git a/wamp/options.go b/wamp/options.go index b8a9ec43..65c0f893 100644 --- a/wamp/options.go +++ b/wamp/options.go @@ -11,6 +11,7 @@ const ( OptInvoke = "invoke" OptMatch = "match" OptMode = "mode" + OptProcedure = "procedure" OptProgress = "progress" OptReceiveProgress = "receive_progress" OptTimeout = "timeout"