Fix REST api issue when distro name with dot is the last parameter in URL