Commit dbe973a
Support
Addresses #15001
The Web MQTT handler only accepts the `mqtt` WebSocket subprotocol,
rejecting clients that request `mqttv3.1`. This prevents some MQTT
clients from establishing WebSocket connections.
This change updates the protocol negotiation to accept either `mqtt` or
`mqttv3.1` subprotocols. The handler uses `lists:search/2` to find the
first matching protocol and echoes that exact value back in the
`sec-websocket-protocol` response header, ensuring proper protocol
negotiation with the client.
(cherry picked from commit 12a6645)
(cherry picked from commit 89df4a2)mqttv3.1 WebSocket subprotocol in addition to mqtt
1 parent b85deb1 commit dbe973a
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments