dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.312 2003/01/18 02:10:37 hno Exp $
+dnl $Id: configure.in,v 1.313 2003/01/18 02:27:14 hno Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE(squid, 3.0-DEVEL)
AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.312 $)dnl
+AC_REVISION($Revision: 1.313 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
fi
])
+dnl Disable hostname checks
+enable_hostname_checks=1
+AC_ARG_ENABLE(hostname_checks,
+[ --disable-hostname-checks
+ Squid by default rejects any host names with
+ odd characters in their name to conform with
+ internet standards. If you disagree with this
+ you may use this switch to turn off any such
+ checks, provided that the resolver used by
+ Squid does not reject such host names.. This
+ may be required to participate in testbeds for
+ international domain names.],
+[ if test "$enableval" = "no"; then
+ echo "Disabling hostname sanity checks"
+ enable_hostname_checks=0
+ fi
+])
+if test "$enable_hostname_checks" = 1; then
+ AC_DEFINE(CHECK_HOSTNAMES, 1, [Enable hostname sanity checks])
+fi
+
dnl Enable underscore in hostnames
AC_ARG_ENABLE(underscores,
[ --enable-underscores Squid by default rejects any host names with _
/*
- * $Id: url.cc,v 1.139 2002/10/25 07:36:32 robertc Exp $
+ * $Id: url.cc,v 1.140 2003/01/18 02:27:16 hno Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
};
static request_t *urnParse(method_t method, char *urn);
+#if CHECK_HOSTNAMES
static const char *const valid_hostname_chars =
#if ALLOW_HOSTNAME_UNDERSCORES
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789-.";
#endif
+#endif /* CHECK_HOSTNAMES */
/* convert %xx in url string to a character
* Allocate a new string and return a pointer to converted string */
*q = '\0';
}
}
+#if CHECK_HOSTNAMES
if (Config.onoff.check_hostnames && strspn(host, valid_hostname_chars) != strlen(host)) {
debug(23, 1) ("urlParse: Illegal character in hostname '%s'\n", host);
return NULL;
}
+#endif
+#if DONT_DO_THIS_IT_BREAKS_SEMANTIC_TRANSPARENCY
/* remove trailing dots from hostnames */
while ((l = strlen(host)) > 0 && host[--l] == '.')
host[l] = '\0';
/* remove duplicate dots */
while ((t = strstr(host, "..")))
xmemmove(t, t + 1, strlen(t));
+#endif
if (Config.appendDomain && !strchr(host, '.'))
strncat(host, Config.appendDomain, SQUIDHOSTNAMELEN);
if (port < 1 || port > 65535) {