Check if a protocol requires a certain port number to be added to an URL.