Squid-2.2.STABLE4: --enable-underscores Added --enable-underscores to have Squid not reject hostnames with _ as part of their name. Squid by default rejects such names to conform with internet standards. (this only adds the configure option to define ALLOW_HOSTNAME_UNDERSCORES, the code has been there since long back) Index: squid/acconfig.h diff -u squid/acconfig.h:1.1.1.22.2.1 squid/acconfig.h:1.1.1.22.2.2 --- squid/acconfig.h:1.1.1.22.2.1 Tue Jul 13 02:11:47 1999 +++ squid/acconfig.h Sun Aug 1 21:51:09 1999 @@ -237,3 +237,5 @@ /* Default ICP port */ #undef CACHE_ICP_PORT +/* Allow _ in hostnames */ +#undef ALLOW_HOSTNAME_UNDERSCORES Index: squid/configure.in diff -u squid/configure.in:1.1.1.34.2.10 squid/configure.in:1.1.1.34.2.11 --- squid/configure.in:1.1.1.34.2.10 Sat Jul 31 01:10:14 1999 +++ squid/configure.in Sun Aug 1 18:20:27 1999 @@ -494,6 +494,21 @@ fi ]) +dnl Enable underscore in hostnames +AC_ARG_ENABLE(underscores, +[ --enable-underscores + Squid by default rejects any host names with _ + in their name to conform with internet standars. + If you disagree with this you may allow _ in + hostnames by using this switch, provided that + the resolver library on the host where Squid runs + does not reject _ in hostnames...], +[ if test "$enableval" = "yes" ; then + echo "Enabling the use of underscores in host names" + AC_DEFINE(ALLOW_HOSTNAME_UNDERSCORES, 1) + fi +]) + # Force some compilers to use ANSI features # case "$host" in Index: squid/configure diff -u squid/configure:1.1.1.32.2.10 squid/configure:1.1.1.32.2.11 --- squid/configure:1.1.1.32.2.10 Sat Jul 31 01:10:10 1999 +++ squid/configure Sun Aug 1 18:20:27 1999 @@ -87,6 +87,14 @@ --disable-ident-lookups This allows you to remove code that performs Ident (RFC 931) lookups." +ac_help="$ac_help + --enable-underscores + Squid by default rejects any host names with _ + in their name to conform with internet standars. + If you disagree with this you may allow _ in + hostnames by using this switch, provided that + the resolver library on the host where Squid runs + does not reject _ in hostnames..." # Initialize some variables set by options. # The variables have the same names as the options, with @@ -1471,6 +1479,20 @@ fi +# Check whether --enable-underscores or --disable-underscores was given. +if test "${enable_underscores+set}" = set; then + enableval="$enable_underscores" + if test "$enableval" = "yes" ; then + echo "Enabling the use of underscores in host names" + cat >> confdefs.h <<\EOF +#define ALLOW_HOSTNAME_UNDERSCORES 1 +EOF + + fi + +fi + + # Force some compilers to use ANSI features # case "$host" in Index: squid/include/autoconf.h.in diff -u squid/include/autoconf.h.in:1.1.1.27.2.3 squid/include/autoconf.h.in:1.1.1.27.2.4 --- squid/include/autoconf.h.in:1.1.1.27.2.3 Tue Jul 13 02:11:54 1999 +++ squid/include/autoconf.h.in Sun Aug 1 18:21:30 1999 @@ -255,6 +255,9 @@ /* Default ICP port */ #undef CACHE_ICP_PORT +/* Allow _ in hostnames */ +#undef ALLOW_HOSTNAME_UNDERSCORES + /* The number of bytes in a int. */ #undef SIZEOF_INT