plugins: Do not try to resolve a wrongly formated hostname

This will prevent to uselessly resolve a node which is not a valid
hostname: when the node is an IPv6 address for instance. In order not to
eat too much time when resolving a node.

Note:
Current PAC API is IPv4 only. For both IPv4/IPv6 support, a new API has
been proposed by Microsoft (look for FindProxyforURLEx). Though one
might argue it could have been better to fix legacy function rather than
inventing new ones, this patch should not affect any later
implementation of such API, like dnsResolveEx()/isInNetEx() etc...

Reported by David Woodhouse <dwmw2@infradead.org>
2 files changed