Message73840
I updated httplib.py, python 2.4, to be able to bind to a specific IP
address when connecting to a remote site.
conn = httplib.HTTPConnection('82.94.237.218', 80)
will connect to '82.94.237.218' using one of the local IP addresses. For
example, if a machine has an primary IP address and an alias such as
eth0 192.168.1.10
eth0:1 192.168.1.11
the outbound connection might use either eth0 or eth0:1. I'm not sure
how it picks now. I added a bind option both for http and https so we
can direct the connection through one or the other. For example,
conn = httplib.HTTPConnection('82.94.237.218', 80, None, None, None,
'192.168.1.10')
would make sure it used 192.168.1.10 not 192.168.1.11.
I ran into this on a server that is contacted by an external legacy
server which requires a reverse connection over the same IP address that
the original connection came in on. |
|
Date |
User |
Action |
Args |
2008-09-26 09:58:52 | eldonz@atlanticdb.com | set | recipients:
+ eldonz@atlanticdb.com |
2008-09-26 09:58:52 | eldonz@atlanticdb.com | set | messageid: <1222423132.09.0.32780438264.issue3972@psf.upfronthosting.co.za> |
2008-09-26 09:58:50 | eldonz@atlanticdb.com | link | issue3972 messages |
2008-09-26 09:58:49 | eldonz@atlanticdb.com | create | |
|