summaryrefslogtreecommitdiff
path: root/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch
blob: da3038d6db40adea398dca6e50c6d406f7545e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
https://github.com/encode/uvicorn/pull/892

diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py
index f35a965d..25110fc6 100644
--- a/tests/protocols/test_http.py
+++ b/tests/protocols/test_http.py
@@ -67,6 +67,7 @@
         b"Host: example.org",
         b"Connection: upgrade",
         b"Upgrade: websocket",
+        b"Sec-WebSocket-Version: 11",
         b"",
         b"",
     ]
diff --git a/tests/protocols/test_websocket.py b/tests/protocols/test_websocket.py
index 24bc285f..7c3fcc08 100644
--- a/tests/protocols/test_websocket.py
+++ b/tests/protocols/test_websocket.py
@@ -51,7 +51,11 @@ def app(scope):
         async with httpx.AsyncClient() as client:
             response = await client.get(
                 "http://127.0.0.1:8000",
-                headers={"upgrade": "websocket", "connection": "upgrade"},
+                headers={
+                    "upgrade": "websocket",
+                    "connection": "upgrade",
+                    "sec-webSocket-version": "11",
+                },
                 timeout=5,
             )
         if response.status_code == 426: