Re: [Squid-cvs] squid3-ipv6 squid3/include config.h,1.7.4.2,1.7.4.3

From: Rafael Martinez Torres <rafael.martinez@dont-contact.us>
Date: Mon, 16 May 2005 18:10:37 +0200 (CEST)

>
> > Hmmm... Yes.. May be URL_NEEDS_BRACKETS ? Any suggestion ?
>
> Fine for me, or perhaps address_needs_brackets?
>
> inline bool address_needs_brackets(const char *host)
> {
> return SAFE_INET_ADDR(host,NULL);
> }
> ....
> ....

 But this should be then moved into "squid.h" or
another more appropiate place other than "config.h" . We will check it
later...

> But in this specific case I think it would make more sense to have
> request->host contain the braketed address and make the ipcache (or
> SAFE_INET_ADDR) understand that IPv6 addresses may be braketed.
>
Well, this might be a bit confusing.... SAFE_INET_ADDR is a wrapper
for inet_pton(...) and formally, brackets do not belong to the address,
but rather to the URL...

The only symbols alowed into the host address are
now defined into

static const char *const valid_hostname_chars

at url.cc

Operationally, this makes easier for sscanf to parse the string (see
url.cc)

I mean, at

ftp://[2003:80:43ab::2]:90
http://2003:80:43ab::2

given DNS ip's for the above adresses

ftp://myweb.dns.com:90
http://myweb.dns.com

ipcache should return 2003:80:43b::2, not two diferent addresses... (I
have to check ipcache )

>
> These kind of macros will be changed into inlines when merged.
>
OK.
Received on Mon May 16 2005 - 10:10:53 MDT

This archive was generated by hypermail pre-2.1.9 : Tue May 31 2005 - 12:00:03 MDT