handle cases where HTTP_HOST is none, like in unit tests