Unable to use the nested groups in route segments
Closed this issue · 2 comments
tomyeh commented
With Rikulo's StreamServer, is it possible to specify a route with optionnal segments ? For example, I tried to build this route pattern:
/default/(controller:\w+)/(action:\w+)(/(id:\w+))?
For matching both /default/user/get and /default/user/get/myId. In fact, this route correctly matches these 2 URLs, but when I try to get the id value with connect.dataset['id'], it's always null :s
source: http://stackoverflow.com/questions/17277819/can-rikulo-stream-use-optionnal-route-segments
tomyeh commented
Notice: it is caused by the nested group, not the optional segments. For example, the following works correctly:
r"/default/(controller:\w+)/(action:\w+)/(id:\w+)?": yourHandler,
r"/default/(controller:\w+)/(action:\w+)": yourHandler