-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
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
Default port overrides requesting a system assigned port #2926
Comments
Makes sense. Marking this as beginner friendly, I'd be happy to review a PR. |
Hi, I'd like to try and fix this one. |
I think it's closed, it shows expected behavior |
Is this one still up for grabs ? |
No, there's a PR for it (see above) |
Yeah but it as inactive for over a month. That's why I asked. |
@Man-Jain you can politely ask the PR implementor to see if he can fix the PR comments otherwise you can fork his PR and try to fix it yourself if you are in a hurry. |
The PR is fine, I just haven't got around to merging it. |
Fix #2926 `Default port overrides requesting a system assigned port`
Expected Behavior
When running a flask application with
app.run(port=0)
, flask should pass the '0' port down to werkzeug to use a port assigned by the operating system.Actual Behavior
The logic in flask/app.py:932 sets the port to the default 5000, which can cause port conflicts, which is the exact situation that setting
port=0
should avoid. This is a regression from the behaviour exhibited in prior versions.Environment
The text was updated successfully, but these errors were encountered: