Be robust to trailing slash in URL