'Calculate the value of the host header from a target.
Args:
target: A string representing the target hostname or the constant
DEFAULT_APP_VERSION.
Returns:
The string to be used as the host header, or None if it can not be
determined.'

@staticmethod
def __host_from_target(target):

    default_hostname = app_identity.get_default_version_hostname()
    if (default_hostname is None):
        return None
    if (target is DEFAULT_APP_VERSION):
        return default_hostname
    else:
        return ('%s.%s' % (target, default_hostname))
