use httplib instead of urllib2
support IPv6 binding