Skip to content

Commit 28bab3b

Browse files
committed
Provide procedure to wildcard clients
1 parent 49e11a0 commit 28bab3b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

router/dealer.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,10 @@ func (d *Dealer) call(caller *session, msg *wamp.Call) {
627627
Details: wamp.Dict{},
628628
Error: wamp.ErrOptionDisallowedDiscloseMe,
629629
})
630-
} else if callee.HasFeature(roleCallee, featureCallerIdent) {
630+
// don't continue a call when discloseMe was disallowed.
631+
return
632+
}
633+
if callee.HasFeature(roleCallee, featureCallerIdent) {
631634
discloseCaller(caller, details)
632635
}
633636
}
@@ -644,6 +647,11 @@ func (d *Dealer) call(caller *session, msg *wamp.Call) {
644647
}
645648
}
646649

650+
if reg.match != wamp.MatchExact {
651+
// according to the spec, a router has to provide the actual procedure to the client.
652+
details[wamp.OptProcedure] = msg.Procedure
653+
}
654+
647655
d.calls[msg.Request] = caller
648656
invocationID := d.idGen.Next()
649657
d.invocations[invocationID] = &invocation{

wamp/options.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const (
1111
OptInvoke = "invoke"
1212
OptMatch = "match"
1313
OptMode = "mode"
14+
OptProcedure = "procedure"
1415
OptProgress = "progress"
1516
OptReceiveProgress = "receive_progress"
1617
OptTimeout = "timeout"

0 commit comments

Comments
 (0)