Skip to content

Commit

Permalink
Bump ASGI spec version to 2.4 (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored Jan 20, 2024
1 parent 04c1974 commit b0092cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion uvicorn/protocols/websockets/websockets_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async def process_request(

self.scope = {
"type": "websocket",
"asgi": {"version": self.config.asgi_version, "spec_version": "2.3"},
"asgi": {"version": self.config.asgi_version, "spec_version": "2.4"},
"http_version": "1.1",
"scheme": self.scheme,
"server": self.server,
Expand Down
2 changes: 1 addition & 1 deletion uvicorn/protocols/websockets/wsproto_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def handle_connect(self, event: events.Request) -> None:
full_raw_path = self.root_path.encode("ascii") + raw_path.encode("ascii")
self.scope: "WebSocketScope" = {
"type": "websocket",
"asgi": {"version": self.config.asgi_version, "spec_version": "2.3"},
"asgi": {"version": self.config.asgi_version, "spec_version": "2.4"},
"http_version": "1.1",
"scheme": self.scheme,
"server": self.server,
Expand Down

0 comments on commit b0092cb

Please sign in to comment.