Skip to content

Commit 91188bf

Browse files
authored
Fix inconsistent HTTPStatus string representation (#60)
In some python environments, HTTPStatus conversion to string will not result in their value but in their repr ("<HTTPStatus.OK: 200>" instead of "200")
1 parent 5cf9208 commit 91188bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

a2wsgi/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __missing__(self, key):
2121

2222
StatusStringMapping = defaultdict(
2323
lambda status: f"{status} Unknown Status Code",
24-
{int(status): f"{status} {status.phrase}" for status in HTTPStatus},
24+
{status.value: f"{status.value} {status.phrase}" for status in HTTPStatus},
2525
)
2626

2727

0 commit comments

Comments
 (0)