url.py: hostname_with_port uses empty string if hostname is None.