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

Reply via email to