vinissimus / async-asgi-testclient

A framework-agnostic library for testing ASGI web applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: websocket scope error

yanyongyu opened this issue · comments

According to asgi document, the websocket connection scheme should be ws or wss, but get http

This cause test failure for quart 0.15+/0.16+ (Error BadRequest)

scope = {
"type": "websocket",
"headers": flatten_headers(headers),
"path": path,
"query_string": query_string_bytes,
"root_path": "",
"scheme": "http",
"subprotocols": [],
}

Reference: https://asgi.readthedocs.io/en/latest/specs/www.html#websocket-connection-scope

Fix released in v1.4.9