Commit 230601c
Server websocket implementation should allow, ignore other subprotocols (#1112)
* Server websocket implementation should allow, ignore other subprotocols
Correctly reads all Sec-Websocket-Protocol headers and reads all values
in those headers, and only succeeds if the expected subprotcol value of
"grpc-websockets" is present. This implementation roughly mirrors what
the nhooyr.io/websocket Accept() method does, with a few
simplifications.
Fixes #1111
* Manually update docs, correct indentation
* Review feedback
Canonicalize the header key before read, normalizing the possible values.
Co-authored-by: Johan Brandhorst-Satzkorn <[email protected]>
Co-authored-by: Johan Brandhorst-Satzkorn <[email protected]>1 parent 53aaf4c commit 230601c
2 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
139 | 151 | | |
140 | 152 | | |
141 | 153 | | |
| |||
0 commit comments