On Tue, 02-Feb-1999 at 15:34:44 -0500, Jon Fraser wrote:
>
> Hello,
>
> Recently a customer complained because he could
> not get to beardie_fun.listbot.com. The name has an
> illegal '_' in it, and squid complains.
>
> I compiled url.c with ALLOW_HOSTNAME_UNDERSCORES. This is
> squid 2.1.patch2. Squid doens't complain about the underscore anymore
> , but the DNS lookup fails. If I do an nslookup on the machine, it
> works. I put an entry in the /etc/hosts for beardie_fun.listbot.com,
> and everything works fine.
>
> This is on Freebsd 2.2.8. I took a look at the
> source for gethostbyname and I don't see it checking for
> illegal characters.
>
> Has anyone else seen this?
Yup, maybe the patch doesn't appliy cleanly, but this made
me happy a while ago. I don't use it anymore since the
offending servers should change their hostname and not I the
resolver...
Well, you should compile that with -DANDRE, of curse, because
this is my way of enabling local changes...
*** lib/libc/net/res_comp.c.ORI Fri May 8 21:36:22 1998
--- lib/libc/net/res_comp.c Fri May 8 21:36:51 1998
***************
*** 148,154 ****
#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
#define borderchar(c) (alphachar(c) || digitchar(c))
! #define middlechar(c) (borderchar(c) || hyphenchar(c))
#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
int
--- 148,154 ----
#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
#define borderchar(c) (alphachar(c) || digitchar(c))
! #ifdef ANDRE
! #define middlechar(c) (borderchar(c) || hyphenchar(c) || ((c) == '_'))
! #else
! #define middlechar(c) (borderchar(c) || hyphenchar(c))
! #endif
#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
int
Received on Tue Feb 02 1999 - 13:44:04 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:44:20 MST