Possible improvement to getting host name used in request