Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always listens on 0.0.0.0 unless host is exactly 127.0.0.1 #52

Open
raylu opened this issue Apr 24, 2024 · 0 comments
Open

always listens on 0.0.0.0 unless host is exactly 127.0.0.1 #52

raylu opened this issue Apr 24, 2024 · 0 comments

Comments

@raylu
Copy link

raylu commented Apr 24, 2024

import sys, fastwsgi

def app(environ, start_response):
    start_response('200 OK', [])
    return [b'hi']

fastwsgi.run(app, sys.argv[1], 8000)

running this with either 127.1 or localhost both cause it to claim

FastWSGI server listening at http://127.1:8000

or

FastWSGI server listening at http://localhost:8008

but

$ netstat -tnlp | rg 8000
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      21863/python3

I suspect it's failing to parse variants of the host that don't exactly match the address of an interface, but it should at least error instead of going ahead with 0.0.0.0

I tried to build the source to see what's up but the Makefile is pretty wonky (it's trying to build with -o instead of -c even though there's no main) so I gave up

raylu added a commit to raylu/baby_debugger that referenced this issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant