[issue3972] Add Option to Bind to a Local IP Address in httplib.py

R. David Murray report at bugs.python.org
Tue Dec 29 00:19:32 CET 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

If you want the maximum chance for this to get applied, it would be best
to have one or a set of patch files in 'svn diff' format against trunk
(see http://python.org/dev for information on how to produce such a
patch, specifically section 6.1 of the dev FAQ).  The tests will need to
be in unittest format (they would go in test_httplib and/or test_socket).

I imagine that writing the unittests so they will run on any machine
might be a tad tricky.  If I were doing it I'd try binding to 127.0.0.1
and checking to see that the socket is bound to that address rather than
0.0.0.0 in the binaddr case, and that it is bound to 0.0.0.0 in the
default case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3972>
_______________________________________


More information about the Python-bugs-list mailing list