url: fix hostname pattern to not accept empty string