Wouter van Heyst added the comment:

What the patch does is replace the hard-coded address 127.0.0.1 for the 
loopback interface with a one-time lookup.  I'd argue the hunk @@ -315,7 +316,7 
@@ should be dropped.

The two arguments that motivate this change are:

  1) The address of the loopback interface is not always 127.0.0.1, binding to 
it may fail.
  2) The tests seem to assume localhost resolves to the same address where the 
server is running.


Working on this patch started with the ConnectionRefusedError that Håkan 
mentioned. 
Applying the patch made the ConnectionRefusedError go away, but I think we may
have solved a different problem and suppressed the real problem as a side
effect.

@r.david.murray: would the patch be acceptable on dropping said hunk, and 
changing the description to 
"Do not assume localhost resolves to 127.0.0.1"?


That still leaves, I think, a hidden bug somewhere in the proxy code that will 
surface in some corner case.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22753>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to