Commit e24a2e6
authored
HttpServer: match the Upgrade header value case-insensitively (#584)
RFC 6455 4.2.1 requires the Upgrade header value to be matched case-insensitively. Fixes the server-side exact "websocket" comparison and a related bug in WebSocketHandshake::insensitiveStringCompare (which used cmp()==0, accepting any value sorting at/above the expected one).
Fixes #583
Build-verified locally with OpenSSL.
Co-authored-by: Audrius Butkevicius1 parent 3230490 commit e24a2e6
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
0 commit comments