Squid-2.3.DEVEL2: --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.23 squid/acconfig.h:1.1.1.23.2.1 --- squid/acconfig.h:1.1.1.23 Sat Aug 7 17:12:37 1999 +++ squid/acconfig.h Sun Aug 8 02:48:57 1999 @@ -251,3 +251,9 @@ * Do we want to use truncate(2) or unlink(2)? */ #undef USE_TRUNCATE + +/* + * Allow underscores in host names + */ +#undef ALLOW_HOSTNAME_UNDERSCORES + Index: squid/configure diff -u squid/configure:1.1.1.33.2.1 squid/configure:1.1.1.33.2.2 --- squid/configure:1.1.1.33.2.1 Sat Aug 7 20:00:38 1999 +++ squid/configure Sun Aug 8 02:48:57 1999 @@ -99,7 +99,16 @@ performance improvement, but may cause problems when used with async I/O. Truncate uses more filesystem inodes than unlink.." +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 # dashes changed to underlines. @@ -1475,6 +1484,20 @@ echo "Enabling truncate instead of unlink" cat >> confdefs.h <<\EOF #define USE_TRUNCATE 1 +EOF + + fi + +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 Index: squid/configure.in diff -u squid/configure.in:1.1.1.35.2.3 squid/configure.in:1.1.1.35.2.4 --- squid/configure.in:1.1.1.35.2.3 Sat Aug 7 22:36:25 1999 +++ squid/configure.in Sun Aug 8 02:49:01 1999 @@ -527,6 +527,20 @@ 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/include/autoconf.h.in diff -u squid/include/autoconf.h.in:1.1.1.28.2.1 squid/include/autoconf.h.in:1.1.1.28.2.2 --- squid/include/autoconf.h.in:1.1.1.28.2.1 Sat Aug 7 20:00:49 1999 +++ squid/include/autoconf.h.in Sun Aug 8 02:49:04 1999 @@ -270,6 +270,9 @@ */ #undef USE_TRUNCATE +/* Allow _ in hostnames */ +#undef ALLOW_HOSTNAME_UNDERSCORES + /* The number of bytes in a int. */ #undef SIZEOF_INT