Detect host:port case correctly