Service path '#' syntax and default behaviours

Implement #646 
Thanks! I have done an slight modification to avoid "/" (or "//", "///", etc.) becomes "" (you can have a look at d85484d).