Removes extra slash on endpoints without a path

Change-Id: I5ce54117c5ac276fb9629c71eb16db88e078c947
Fixes: bug #1179984