Hi,
Henrik Nordstrom wrote:
The client resolving functions is there within Squid, just not used in the error page code.
The only implication is that the error page code can not wait for the name to be resolved. If not already know by Squid it can not be displayed.
You can play some tricks with http_access to make Squid resolve the client name however.
hm, prior to your reply i made the following patch to errorpage.c to solve the problem:
[EMAIL PROTECTED]:./squid-2.5.STABLE4/src# diff errorpage.c errorpage.c_20040622 513,523d512 < case 'n': < /* resolv client hostname. */ < printf(" "); < struct hostent *hp_new = NULL; < struct in_addr addr; < < addr.s_addr = inet_addr(inet_ntoa(err->src_addr)); < hp_new = gethostbyaddr((char *) &addr, 4, AF_INET); < < memBufPrintf(&mb, "%s", hp_new->h_name); < break;
Admittedly it's a quick and dirty hack, but it seems to work. From your experience, would you say this might cause havoc with squid and should be solved with a different approach?
Thanks & Regards,
Frank
P.S.: Should "code"-questions preferably be posted to the squid-dev list?
