Search squid archive

Re: How to determine if URL in HttpRequest is an Ip address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux