Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7674 > unrolled thread

Re: Question regarding DNS resolution in urllib2

Started byChris Angelico <rosuav@gmail.com>
First post2011-06-15 16:45 +1000
Last post2011-06-15 16:45 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Question regarding DNS resolution in urllib2 Chris Angelico <rosuav@gmail.com> - 2011-06-15 16:45 +1000

#7674 — Re: Question regarding DNS resolution in urllib2

FromChris Angelico <rosuav@gmail.com>
Date2011-06-15 16:45 +1000
SubjectRe: Question regarding DNS resolution in urllib2
Message-ID<mailman.259.1308120313.11593.python-list@python.org>
On Wed, Jun 15, 2011 at 4:23 PM, saurabh verma <nitw.saurabh@gmail.com> 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://something.com” , now something.com will try to connect to either IPA or IPB which I don’t have control over , I know internally it must be calling a DNS resolver libarary of python , I want to control over that , may be libcurl2 exposing a function to do some DNS altering .

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.

Chris Angelico

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web