[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wwwsearch-general
Subject:    [wwwsearch-general] Connecting to a server different to the one in
From:       Dan Ellis <dellis () synacor ! com>
Date:       2011-09-15 16:12:48
Message-ID: 4E722400.90604 () synacor ! com
[Download RAW message or body]

Hi,

For testing purposes, I need to have mechanize.Browser to connect to a 
host different to the one specified in the URL. This is simulating the 
functionality of using entries in /etc/hosts, but configurable 
per-request. I have tried to do this using a custom HttpHandler, but I 
could not get my handler to be called.

An alternative option that would probably be acceptable would be to have 
a URL pointing to the server I really want to connect to, and change the 
Host header in the request. However, setting addheaders or calling 
add_header results in the Host header I specify being overwritten by the 
one in the URL (despite the code appearing to check that one doesn't 
already exist).

I am using version 0.2.5. How might I achieve my goal?

-- 
Dan Ellis, Senior Engineer
Synacor

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
wwwsearch-general mailing list
wwwsearch-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wwwsearch-general
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic