Re: Question regarding DNS resolution in urllib2

2011-06-25 Thread Michael Hrivnak
As I noted, the feature was introduced in version 7.21.3. From your post, it looks like you're running version 7.19.7. Perhaps you should look into getting a newer version of curl. Or if you're feeling brave and have some C skills, you could try implementing this feature in pycurl! That would b

Re: Question regarding DNS resolution in urllib2

2011-06-24 Thread saurabh verma
Michael Hrivnak wrote: The latest libcurl includes the CURLOPTS_RESOLVE option (http://curl.haxx.se/libcurl/c/curl_easy_setopt.html) that will do what you want. It may not have made its way into pycurl yet, but you could just call the command-line curl binary with the --resolve option. This fea

Re: Question regarding DNS resolution in urllib2

2011-06-18 Thread Michael Hrivnak
The latest libcurl includes the CURLOPTS_RESOLVE option (http://curl.haxx.se/libcurl/c/curl_easy_setopt.html) that will do what you want. It may not have made its way into pycurl yet, but you could just call the command-line curl binary with the --resolve option. This feature was introduced in ve

Re: Question regarding DNS resolution in urllib2

2011-06-15 Thread saurabh verma
> > You don't need to edit it on the server; just use any handy computer. > You need only tinker with the configuration on the client, not the > server. > Hmm true , Ok i can widen the problem statement but editing /etc/hosts still looks Ok for my test server . ( Thinking of putting this as a

Re: Question regarding DNS resolution in urllib2

2011-06-15 Thread Chris Angelico
On Wed, Jun 15, 2011 at 5:50 PM, saurabh verma wrote: >> If you edit your hosts file, it will affect where something.com points >> - you can force it to be IPA and then test, then force it to IPB and >> test. You'll still be downloading https://something.com so the HTTPS >> handshake should work e

Re: Question regarding DNS resolution in urllib2

2011-06-15 Thread saurabh verma
> > > > If you edit your hosts file, it will affect where something.com points > - you can force it to be IPA and then test, then force it to IPB and > test. You'll still be downloading https://something.com so the HTTPS > handshake should work exactly the same way. > > there are issues with editin

Re: Question regarding DNS resolution in urllib2

2011-06-14 Thread Chris Angelico
On Wed, Jun 15, 2011 at 4:23 PM, saurabh verma wrote: > But in the case of https , I can do above because https handshake is based on > the domain i am trying to connect , so lets say I want to following inside a > python  script using libcurl2 but without touching /etc/hosts , > > curl “https:/

Re: Question regarding DNS resolution in urllib2

2011-06-14 Thread saurabh verma
On 15-Jun-2011, at 6:13 AM, Chris Angelico wrote: > On Wed, Jun 15, 2011 at 4:34 AM, saurabh verma wrote: >> hi , >> >> I trying to use urllib2 in my script , but the problem is lets say a domains >> resolves to multiple IPs , If the URL is served by plain http , I can add >> “Host: domain” h

Re: Question regarding DNS resolution in urllib2

2011-06-14 Thread Chris Angelico
On Wed, Jun 15, 2011 at 4:34 AM, saurabh verma wrote: > hi , > > I trying to use urllib2 in my script , but the problem is lets say a domains > resolves to multiple IPs , If the URL is served by plain http , I can add > “Host: domain” header and check whether all IPs are returning proper > resp