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 15:48:49 +1300

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
Received on Wed Oct 16 2013 - 02:49:00 MDT

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