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

Fix crash when --interface is wsgi #730

Merged
merged 2 commits into from Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/test_config.py
Expand Up @@ -31,6 +31,7 @@ def test_wsgi_app():

assert isinstance(config.loaded_app, WSGIMiddleware)
assert config.interface == "wsgi"
assert config.asgi_version == "3.0"


def test_proxy_headers():
Expand Down
2 changes: 1 addition & 1 deletion uvicorn/config.py
Expand Up @@ -202,7 +202,7 @@ def __init__(

@property
def asgi_version(self) -> str:
return {"asgi2": "2.0", "asgi3": "3.0"}[self.interface]
return {"asgi2": "2.0", "asgi3": "3.0", "wsgi": "3.0"}[self.interface]

@property
def is_ssl(self) -> bool:
Expand Down