[New-bugs-announce] [issue39211] Change in http.server default IP behavior?

Shane report at bugs.python.org
Sat Jan 4 13:26:34 EST 2020


New submission from Shane <shanesmith4 at gmail.com>:

It seems to me that the direct invocation behavior for http.server changed, probably with Python 3.8 (I'm currently using 3.8.1 on Windows 10).  On 3.7.X I was able to use it as described in the docs (https://docs.python.org/3/library/http.server.html)

> python -m http.server 8000

and it would default to whatever IP address was available.  Now, in order for it to function at all (not return "This site can’t be reached" in Chrome), I have to bind it to a specific IP address (say, 127.0.0.1, sticking with the docs example).

> python -m http.server 8000 --bind 127.0.0.1

At which point it works fine.  So it's still quite usable for this purpose, though I was surprised and -simple as the solution is- the solution is less simple when you don't know it!

Was this an intended change?  Something something security, perhaps?  If so, should it be noted in the "What's new" of the docs?  And of course, there's always the slight possibility that some aspect of Windows or Chrome behavior changed, but based on the termal's response I don't think that's the case.

Thanks,

----------
messages: 359299
nosy: Shane Smith
priority: normal
severity: normal
status: open
title: Change in http.server default IP behavior?
versions: Python 3.8

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


More information about the New-bugs-announce mailing list