Detect whether a port should be appended to base_uri