Re: [squid-users] How to determine if URL in HttpRequest is an Ip address

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 16 Oct 2013 18:14:52 +1300

On 16/10/2013 4:13 p.m., Sachin Gupta wrote:
> 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?

No. It means the results of attempting to parse the host portion of URL
as an IP address.

Please use the accessor I mentioned earlier.

Amos
Received on Wed Oct 16 2013 - 05:14:58 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 16 2013 - 12:00:05 MDT