if (!popts->use_host_err_chk)
if (popts->use_internal_host_chk) { if (!httpd__valid_hostname(lfn, pos, len)) return (FALSE); }  if (!popts->use_host_chk)
static int httpd__chk_vhost(const Httpd_policy_opts *popts,                            Vstr_base *lfn, size_t pos, size_t len){  const char *vhost = NULL;  struct stat64 v_stat[1];  const Vstr_base *def_hname = popts->default_hostname;  int ret = -1;    ASSERT(pos);  if (!popts->use_host_err_chk)    return (TRUE);    if (vstr_cmp_eq(lfn, pos, len, def_hname, 1, def_hname->len))    return (TRUE); /* don't do lots of work for nothing */  vstr_add_vstr(lfn, pos - 1, 		popts->document_root, 1, popts->document_root->len,                VSTR_TYPE_ADD_BUF_PTR);  len += popts->document_root->len;    if (lfn->conf->malloc_bad || !(vhost = vstr_export_cstr_ptr(lfn, pos, len)))    return (TRUE); /* dealt with as errmem_req() later */    ret = stat64(vhost, v_stat);  vstr_del(lfn, pos, popts->document_root->len);  if (ret == -1)    return (FALSE);  if (!S_ISDIR(v_stat->st_mode))    return (FALSE);    return (TRUE);}