[issue39211] Change in http.server default IP behavior?

Jason R. Coombs report at bugs.python.org
Sun Jan 5 14:36:12 EST 2020


Jason R. Coombs <jaraco at jaraco.com> added the comment:

> It's the addition of flags=socket.AI_PASSIVE on Lib/http/server.py:1233 that's causing this.

Can you elaborate? What is it causing?

I can see that flag was added in https://github.com/python/cpython/pull/11767/commits/62dbe55c9d88c75868399de9d86bcd947e23951c for the purpose of:

> indicate to get the wildcard address (all interfaces).

I don't recall beyond that why I went that route.

I can see in https://github.com/cherrypy/cherrypy/issues/871, CherryPy had to add [this code](https://github.com/cherrypy/cheroot/blob/420d50c4167be89ee4f5841a493fbd2bb929982e/cheroot/server.py#L1946-L1962) to support dual-stack operation. I suspect that's also what Python needs here (in addition to a test that binding on :: responds on 127.0.0.1).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39211>
_______________________________________


More information about the Python-bugs-list mailing list