Handle port number in url when computing filename