def get_normalized_hostname(env):
	"""
	Get the best hostname we can find in the provided environment.
	
	If the request came in on an alternate port, it will be
	appended to the result.
	"""
	host = env.get('HTTP_HOST', env['SERVER_NAME'])
	if(host.find(':') == -1):
		host += ':' + env['SERVER_PORT']
	return host