Question regarding DNS resolution in urllib2

S

saurabh verma

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 responses or not , but in case of https , I have to trust on my local machines dns resolver and I can’t apply host header in the request .

Is it possible to override dns resolver in urllib2 or something else ?

I wanted to control the IPs which urllib2 is trying to connect .


I Hope I am some sense out of my question ,

Thanks in advance.

~saurabh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top