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

Shane report at bugs.python.org
Sun Jan 5 10:37:22 EST 2020


Shane <shanesmith4 at gmail.com> added the comment:

A small update:

Using the direct invocation:

> python -m http.server 8000
Serving HTTP on :: port 8080 (http://[::]:8080/) ...

Is NOT accessible at the following addresses:
http://[::]:8080/  # most surprising, because this is where it tells you to go
http://<my_ip_address>:8080/  # this was the Python <= 3.7 behavior, as I used it anyhow

But it IS accessible at the following addresses:
http://[::1]:8080/
http://localhost:8080/


There may be others I don't know about.  I recognize that my difficulties likely arise from a lack of familiarity with internet protocols, as this isn't something I use with any kind of regularity.  But I do think it's possible (and desirable) for the method to be as casual-friendly as it was in Python 3.7.

Specifically, the direct invocation tells the user they can go to http://[::]:8080/, which they cannot.  They CAN go to http://[::1]:8080/.  Should this instead be the message returned on direct invocation?

So far as I can tell, this is still a behavior change, as the old behavior was accessible from your IP address and therefore visible to other computers on the network (I assume localhost is not).  But it would at least do what it says on the tin.

----------

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


More information about the Python-bugs-list mailing list