Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Chris Angelico
On Fri, Jun 20, 2014 at 12:19 AM, Robin Becker wrote: > in practice [monkeypatching socket] worked well with urllib in python27. Excellent! That's empirical evidence of success, then. Like with all monkey-patching, you need to keep it as visible as possible, but if your driver script is only a p

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
On 19/06/2014 13:03, Chris Angelico wrote: . I can use python >= 3.3 if required. The main reason I ask is in case something's changed. Basically, what I did was go to my Python 2 installation (which happens to be 2.7.3, because that's what Debian Wheezy ships with - not sure why it has

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Chris Angelico
On Thu, Jun 19, 2014 at 9:51 PM, Robin Becker wrote: >> Since you mention urllib2, I'm assuming this is Python 2.x, not 3.x. >> The exact version may be significant. >> > I can use python >= 3.3 if required. The main reason I ask is in case something's changed. Basically, what I did was go to my

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
.. Since you mention urllib2, I'm assuming this is Python 2.x, not 3.x. The exact version may be significant. I can use python >= 3.3 if required. Can you simply query the server by IP address rather than host name? According to the docs, urllib2.urlopen() doesn't check the certific

Re: urllib/urllib2 support for specifying ip address

2014-06-19 Thread Chris Angelico
On Thu, Jun 19, 2014 at 7:22 PM, Robin Becker wrote: > I want to run torture tests against an https server on domain A; I have > configured apache on the server to respond to a specific hostname ipaddress. > > I don't want to torture the live server so I have set up an alternate > instance on a di

urllib/urllib2 support for specifying ip address

2014-06-19 Thread Robin Becker
I want to run torture tests against an https server on domain A; I have configured apache on the server to respond to a specific hostname ipaddress. I don't want to torture the live server so I have set up an alternate instance on a different ip address. Is there a way to get urlib or urllib2