Yes. I intent to check the host portion only. In HttpRequest.h, a check is being made: if ( host_addr.IsAnyAddr() ) { xstrncpy(host, src, SQUIDHOSTNAMELEN); host_is_numeric = 0; Does host_addr mean the host part of the destination URL? Regards On Wed, Oct 16, 2013 at 8:18 AM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: > On 16/10/2013 4:50 a.m., Sachin Gupta wrote: >> >> Hi, >> >> I have the HttpRequest object from which urlPath can be found. >> Is there a way to determine in squid code if the URL being accessed is >> an Ipaddress? >> >> Regards > > > Full-URL is never an IP address. It may contain one. But there is also > scheme and optional /path ?query-string and #fragment sections to btaken > into account. > > You can test the request->GetHostIsNumeric() in the current releases to see > if the host portion of the URL is an IP address. > > Amos