MDL-37774 Do not pass trailing slash if the method does not want it